hermann on Thu, 06 Jul 2023 11:56:14 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: How to do t_INT bit operations?


On 2023-07-06 09:56, Ruud H.G. van Tol wrote:
AFAIK, these do about all the same:

print(Str(gettime())"ms");
print(Str(gettime())ms);
print(Str(gettime()),"ms");
print(Str(gettime(),"ms"));
print(Str(gettime()ms));
print(gettime()ms);
print(gettime(), "ms");

And I would always use the last one.

Thanks for nitpicking, and yes, all work and do the same.
And yes, the last one is preferable.

I hardly ever use gettime(), I prefer to use
stored getabstime() values, with printf.

getabstime() is similar to Arduino "millis()" (time since start of Arduino board). But for determining runtime of single command or partial sequence of commands
gettime() avoids having to do subtraction of time after and time before.

? ?gettime
gettime(): milliseconds of CPU time used since the last call to gettime.

? ?getabstime
getabstime(): milliseconds of CPU time since startup.

?


Regards,

Hermann.