' // this is my type
Type mRT_iBeacon(enabled As Int, _
update_freq As Int, _
iBeaconAPvalidtime As Int, _
iBeaconAPdataRecordValidTime As Int, _
iBeaconAPwaitTimeSOS As Int, _
iBeaconAPwaitTimeSOSTimeout As Long, _
send_alert_via_wifi As Int, _
next_update As Long, _
networks As String, _
last_networks As String, _
ws As mSocket, _
iBeacon_last_fix As String, _
iBeacon_last_time As Long, _ ' // this is var that store the ticks
pkt As String, _
pkt_alert As String, _
pkt_alert_pending As Boolean, _
pkt_alert_sent As Boolean, _
track As Int, _
timeout As Long, _
iBeacon_valid_until As Long, _
iBeacon_valid_kill As Long, _
restart As Boolean, _
restart_msg As String, _
restart_type As String _
)
' // this is the line of code that assigns the datetime ticks
Main.APPSET.RT_iBeacon.iBeacon_last_time = DateTime.Now
mod_settings.put_ibeacon_last_time
' // this is theline of code that gets the store ticks
Main.APPSET.RT_iBeacon.iBeacon_last_fix = mod_settings.get_ibeacon_last_time
' // these functions are in a module, mod_settings
Sub put_iBeacon_last_time
Try
KVS.PutSimple("iBeacon_last_time",Main.APPSET.RT_iBeacon.iBeacon_last_time)
Catch
ToastMessageShow("mod_settings(), put_ibeacon_last_networks_time, error - " & LastException.Message,True)
mod_functions.writelog("mod_settings(), put_ibeacon_last_networks_time, error - " & LastException.Message )
End Try
End Sub
Sub get_ibeacon_last_time As Long
Try
Dim res As Long = KVS.GetSimple("iBeacon_last_time")
mod_functions.writelog("mod_settings(), get_ibeacon_last_time, res - " & res )
Return res
Catch
ToastMessageShow("mod_settings(), get_ibeacon_last_time, error - " & LastException.Message,True)
mod_functions.writelog("mod_settings(), get_ibeacon_last_time, error - " & LastException.Message )
Return ""
End Try
End Sub