MCPcopy Create free account
hub / github.com/tensorflow/tensorboard / _time_delta_from_info

Function _time_delta_from_info

tensorboard/notebook.py:233–244  ·  view source on GitHub ↗

Format the elapsed time for the given TensorBoardInfo. Args: info: A TensorBoardInfo value. Returns: A human-readable string describing the time since the server described by `info` started: e.g., "2 days, 0:48:58".

(info)

Source from the content-addressed store, hash-verified

231
232
233def _time_delta_from_info(info):
234 """Format the elapsed time for the given TensorBoardInfo.
235
236 Args:
237 info: A TensorBoardInfo value.
238
239 Returns:
240 A human-readable string describing the time since the server
241 described by `info` started: e.g., "2 days, 0:48:58".
242 """
243 delta_seconds = int(time.time()) - info.start_time
244 return str(datetime.timedelta(seconds=delta_seconds))
245
246
247def display(port=None, height=None):

Callers 3

startFunction · 0.85
_displayFunction · 0.85
listFunction · 0.85

Calls 1

timeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…