Dear friends,
i worked on that code and i am stucked here... When i try to save user_time to a file it wont match with the current_time i mean the format...
here is my code:
Code:
import appuifw, time, e32
autime = "c:\\system\\autime.ini"
def uptime():
f = open(autime, 'r')
tim = f.read()
f.close()
return tim
def setautoupdate():
user_time = appuifw.query(u"ENTER UPDATE TIME:", "time")
f = open(autime, 'w')
f.write(str(user_time))
f.close()
appuifw.note(u"UPDATE TIME SAVED !", 'info')
def autoupdateon():
timer=timer = e32.Ao_timer()
tm=uptime()
autime=1
current_time = time.localtime()[3:5]
while autime:
if current_time == tm:
appuifw.note(u"UPDATING DATA...", 'info')
else:
pass
timer.after(0)
.....
.......
When i open the saved file i see some numbers like 84960.0 not a time like 23.45... So how can i match the current_time and saved user_time so my loop can work correct?
Regards...