2019-06-25 08:21:36 +00:00
|
|
|
import math, time
|
|
|
|
def get_rounded_epoch(roundS=60):
|
|
|
|
'''
|
|
|
|
Returns the epoch, rounded down to given seconds (Default 60)
|
|
|
|
'''
|
|
|
|
epoch = get_epoch()
|
|
|
|
return epoch - (epoch % roundS)
|
|
|
|
|
2019-06-25 23:07:35 +00:00
|
|
|
def get_epoch():
|
2019-06-25 08:21:36 +00:00
|
|
|
'''returns epoch'''
|
|
|
|
return math.floor(time.time())
|