Android Question [SOLVED] PhoneSensors2 timestamp ?

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello,

I don't understand the value provided by @daemon 's PhoneSensors2 library.

As timestamp, I get "34426473161828" while in the same time datetime.now equals to "1420205770368" (today 14:36:10).

The timestamp provided seems for me to be longer than the current time's one.

34426473161828
1420205770368

B4X:
Sub PS_SensorChanged (Values() As Float, TimeStamp As Long)

    Dim tm As Long
    tm=TimeStamp

    Log(Values(0) & CRLF & Values(1) & CRLF & Values(2) & CRLF & tm)
'    LogColor(DateTime.now & CRLF & CRLF,Colors.blue)
    Dim CurrentTime As Long
    CurrentTime = DateTime.Now
    LogColor(CurrentTime,Colors.blue)
    Log(DateTime.Time(CurrentTime))
    Log(CRLF & CRLF)


End Sub

Please, do you see what I am missing ? Many thanks
 

udg

Expert
Licensed User
Longtime User
Hi lemonisdead,
welcome back home!

I never used that lib, but I believe it was written to take in account nanoseconds instead of milliseconds.

udg
 
Upvote 0
Top