I am using simultaneously HP Ipaq(Win mobile,B4PPC) and Sony reader(Android,B4A) for sending also date datas. Sorting is much easier with tics, but they are different in both versions.
Any suggestions how to equalize these in B4A to B4PPC?
Sub Process_Globals
Dim NET_TICKS_AT_EPOCH, NET_TICKS_PER_MILLISECOND As Long
NET_TICKS_AT_EPOCH = 621355968000000000
NET_TICKS_PER_MILLISECOND = 10000
End Sub
Sub ConvertNetToB4A(NetTicks As Long) As Long
Return (NetTicks - NET_TICKS_AT_EPOCH) / NET_TICKS_PER_MILLISECOND
End Sub
Sub ConvertB4AToNet(Ticks As Long) As Long
Return Ticks * NET_TICKS_PER_MILLISECOND + NET_TICKS_AT_EPOCH
End Sub
I haven't tested it so please do some tests yourself.
I know why constant, but for me it works with constant that is 36000000000 ticks greater. I suppose it is one hour from time zone or something like that..