mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
#40986 10/08/03 10:15 PM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
how do i get the time in seconds?

#40987 10/08/03 10:18 PM
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
Sorry, I've made a couple of miscalculations... It's too early in the morning. I realized it after I tried making an example code and ended up with 1,000,000 seconds... confused

Firstly, calculate the hour with: $calc($time(H) * 60 * 60)
Then calculate the minutes with: $calc($time(nn) * 60)
Then finally add it all together: $calc(%hrs + %mins + $time(ss))

This should return the right time now.

Last edited by lammkott; 10/08/03 10:28 PM.

- Jason
#40988 10/08/03 10:27 PM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
my progress bar is full...its 6:25pm...

text "1 0 86400", 18, 388 64 85 20

alias sitime {
if (%si.time == 1) {
if ($dialog(si)) {
set %si.time.now $calc(($time(Hnn) * 60) * 60)
//did -ra si 18 %si.time.now
}
}
else { .timersitime off }
}

#40989 10/08/03 10:30 PM
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
Yeah, I thought that would happen, my mistake.


- Jason
#40990 10/08/03 10:39 PM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
what about if i use minutes?

#40991 10/08/03 10:41 PM
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
Seconds would be more accurate, but, it's your choice.


- Jason
#40992 10/08/03 10:43 PM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
ok i think if i went by hours it would be easyer...so i set my dialog for 1 - 24 how can i get the hour that it is now?

Last edited by MTech; 10/08/03 10:46 PM.
#40993 10/08/03 10:49 PM
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
$calc(($time(H) * 60 ) + $time(n))


- Jason
#40994 10/08/03 10:52 PM
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
Yeah, hours would be a lot easier because you'd only have to return $time(H), although, how would you display the time when it's 13:52? Even though it is almost 2pm, it would still display it as 1pm because that's what the hours read.


- Jason
#40995 10/08/03 10:56 PM
Joined: Mar 2003
Posts: 437
M
MTech Offline OP
Fjord artisan
OP Offline
Fjord artisan
M
Joined: Mar 2003
Posts: 437
thanks smile

Page 2 of 2 1 2

Link Copied to Clipboard