Android Question [SOLVED?] Phone library v2.40 - PhoneSensors.TimeStamp seems to be returning millisecs not nanosecs

JackKirk

Well-Known Member
Licensed User
Longtime User
At my request:

https://www.b4x.com/android/forum/threads/request-for-phonesensors-accuracy-property.72930/

Erel just added an Accuracy property to the Phonesensors object:

https://www.b4x.com/android/forum/threads/updates-to-internal-libraries.59340/#post-463591

He also added a Timestamp property which is also very useful for my purposes (I was using DateTime.Now which is not as accurate).

I am assigning the Timestamp property to a Long but I seem to be getting milliseconds, not nanoseconds as indicated in the documentation.

Am I doing something wrong or is the Timestamp property faulty.

Thanks...
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
Yuk - looks like another musty little corner - guess its back to Datetime.Now for consistency across all Android devices.
 
Upvote 0
Top