Skip to content

Missing time.time() in Circuitpython 5.2.0 #2812

@walchko

Description

@walchko

Hello, according to the documentation here, there is supposed to be a time.time() function like normal python. However, when I try to use this function it doesn't exist. It is probably just a documentation oversight. My output from the error and REPL is shown below:

code.py output:
Traceback (most recent call last):
  File "code.py", line 37, in <module>
  File "code.py", line 17, in __init__
AttributeError: 'module' object has no attribute 'time'



Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.2.0 on 2020-04-09; Adafruit Trinket M0 with samd21e18
>>> import time
>>> time.time()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'time'
>>> dir(time)
['__name__', 'monotonic', 'sleep', 'struct_time']
>>> 

I am using a Trinket M0 and circuitpython 5.2.0.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions