You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
11 lines
215 B
Python
11 lines
215 B
Python
import time
|
|
|
|
def epoch_seconds():
|
|
import sys
|
|
if sys.platform == "esp32":
|
|
# on esp32, it needs this correction:
|
|
return time.time() + 946684800
|
|
else:
|
|
return round(time.time())
|
|
|