0

How can I store time specific minutes in ram and reuse it when the app is runing again. It's like to store it even when the pc is off it must keep it in monery or ram or in some place that keep the value store

import time
import sys
store_time = time.strftime("%M") // this is the current minutes
time_val = 2 // this is the max hour of used 
store_value = store_time /60
if store_value == time_val:
    print('you reach the max of use of the app')
    exit()
Timus
  • 10,974
  • 5
  • 14
  • 28
erro nano
  • 3
  • 1
  • 3

1 Answers1

0

If you want this to persist when the device is turned off you need to write to disk. Follow example here. Then read it in again like this

jprockbelly
  • 1,533
  • 15
  • 30