New to python (from Parallax's STAMP's & Propeller, and recently Arduino and C++) I'm not a pro coder, this is not my profession, just my passion and hobby.
[b]According to Python 3.3+ documentation[/b] the time.get_clock_info(name) returns a namespace object.
When I query ipython3 with : [code]time.get_clock_info('perf_counter')[/code] , it returns with the namespace object printed out.
I noticed a difference with calling 'perf_counter' vs 'clock' in that the reported resolution from 'perf_counter' is 1e-09 and the resolution from 'clock' is 1e-06..
And while running this quick, tight iter:
[code]for t in range(10):
iv[t] = time.time()
for y in range(10):
print(iv[y])[/code]
I get numbers as :
1493761419.8588312
1493761419.8588355
1493761419.8588371
1493761419.8588393
1493761419.8588412
1493761419.8588430
1493761419.8588452
Similarly, the time.clock() prints out as a float (0.700483)
[b]So, how would I be able to convert these floats to usable int values like a long or double representing uS or nS "ticks"?[/b]
I will try to "&"-off the larger significant number and just multiply the fractal part by 1e06 and change it to an int as the fractal part which seems fairly accurate to 1e-06 when using time.time()
Edit: Title and some code and output display for clarity.