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)
| 231 | |
| 232 | |
| 233 | def _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 | |
| 247 | def display(port=None, height=None): |