The BASIC function Now() is described as returning its result as a value of type ‘Date’. The type ‘Date’ I could nowhere find clearly specified. What I could find was gibberish, imo. The name itself also is, as the type is capable of keeping a date and a time as well at the same time. It should be named DateTime if used at all.
Sorry! It seems I didn’t up to now stumble upon the fact that the type ‘Date’ if having assigned a date-time-value in ‘Double’ resolution always converts the value in a way that only full seconds are kept. Thus the BASIC type ‘Date’ and therefore also the BASIC function Now() will be useless for any technical application needing a higher resolution of time.
The Calc function NOW() produces and returns the date-time value as a ‘Double’ number allowing for a time resolution of about 1 ms (millisecond) for the next few centuries.
Needing high-resolution-NOW-values I only can suggest to resort to
myFA = CreateUnoService("com.sun.star.sheet.FunctionAccess")
highResDateTime = myFA.CallFunction("NOW", Array())
That’s a silly detour, of course. Making Now() return the full achievable resolution and leving the rounding to the user should be a better way.
Of course, we have always to consider that a multitasking system may distort time analysis. This, however, is valid for a spreadsheet as it is for a BASIC routine.