MCPcopy Create free account
hub / github.com/pytorch/tutorials / timeSince

Function timeSince

intermediate_source/char_rnn_generation_tutorial.py:309–314  ·  view source on GitHub ↗
(since)

Source from the content-addressed store, hash-verified

307import math
308
309def timeSince(since):
310 now = time.time()
311 s = now - since
312 m = math.floor(s / 60)
313 s -= m * 60
314 return '%dm %ds' % (m, s)
315
316
317######################################################################

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected