In the file "djhora" I have stored the time value "count4d" .
What I want is to recover this value and subtract it to the current time .
If the result is equal to 180 seconds then execute a command.
.....more commands.....
if {![file exists djhora]} {
set count4d [clock seconds]
set temp [open "djhora" w+]
puts $temp "$count4d"
close $temp
}
set temp [open "djhora" r]
set djh [gets $temp]
close $temp
if {[expr {[clock seconds] - $djh}] == 180} { do more commands..... }
What is wrong ?
If you do not understand my ideas is because I can not think in English, I help me with Google Translate. I only speak Spanish. Bear with me. Thanks