mIRC Home    About    Download    Register    News    Help

Print Thread
#41545 13/08/03 02:53 PM
Joined: Aug 2003
Posts: 4
R
Self-satisified door
OP Offline
Self-satisified door
R
Joined: Aug 2003
Posts: 4
an simple example .. my systemclock show '09:00' .. when I start a timer like '/timer1 08:59 1 0 echo -s just a test' it will be executed.

I dont know if it is a known bug (sorry if it is)

#41546 13/08/03 03:08 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
BUG!!!
Verified w/ 6.03 winnt4


Code:
//if ( khaled isgod ) echo yes | else echo no
#41547 13/08/03 08:28 PM
Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
yup it executes for me using winXP mirc 6.03 ... id say its a bug of some sort ..... i dont know why when the system clock is one minute ahead of the time u set the timer for that it would execute.


D3m0nnet.com
#41548 14/08/03 05:57 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
weird, worked for me fine on win95b - when the system clock changed, it executed


Those who fail history are doomed to repeat it
#41549 14/08/03 03:28 PM
Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
Executes for me (WinXP Professional Edition, mIRC 6.03).

Don't want to be patronising or anything, but make sure you only make the timer execute 1 minute before the time in your system tray (for example, if it says 13:21 then do /timer1 13:20 blah blah). Make sure you got v6.03 too...

Otherwise, weird if it's affected by Windows OS....I'm going to complain to Bill!

Regards,



Mentality/Chris
#41550 14/08/03 06:02 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Interesting.

If I had to make a guess, I'd say because Timers are slightly inaccurate (slow), that Khaled leaves a window of tolerence in case the timer fires late or has to wait for a script to finish (eg, $findfile).

So, it's probably saying "Hmm, I was suppose to fire at 8:59 and it's 9:00 already... POOP, I'm late!"

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#41551 14/08/03 06:05 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
You really shure it using that "POOP" sound? grin wink


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#41552 14/08/03 08:21 PM
Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
good point ..... but could this also be something in the reasoning behind the 49 day limit too? i guess only khaled himself can explain this one


D3m0nnet.com
#41553 15/08/03 05:39 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Oh, that one's easy. grin

Internally, mIRC uses 32bit (Long) intergers to store the timer's delay and repetitions.

2^32 == 4294967296, that is the greatest value a 32bit unsigned long can store.

Since you can specify a duration in milliseconds with -m, mIRC simply converts and stores all timer durations in milliseconds.

4294967296 / 24 / 60 / 60 / 1000 == 49days 17hrs 2mins 48secs 296ms

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#41554 15/08/03 06:30 AM
Joined: Dec 2002
Posts: 1,541
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Dec 2002
Posts: 1,541
yup - I see what you mean now. Misunderstood before but did as you stated and it fired off


Those who fail history are doomed to repeat it
#41555 15/08/03 05:23 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
I don't know if the Borland compiler supports it, I know MSVC++ does, it has a type called _int64 (64bit integer). The Windows headers have a type called LONGLONG (which is also 64bit). Using that for the timer information would solve that problem. That datatype isn't exactly standard, a 64bit integer is standard in C, but not in C++. However I've yet to find a compiler that prohibits its use in C++, so as long as Khaled doesn't care whether mIRC compiles on _every_ standard compiler, it should solve the problem.

#41556 16/08/03 04:53 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Agreed.

I never suggested there wasn't a solution, though I'd ask if a "solution" is necessary for this "bug".

My concern with using a 64bit int in the /timer code in a 32bit environment, is the extra few but collective cycles spent in accessing the variable... all for the 1 in a million chance someone needs a 50 day duration.

I think Khaled should first worry about bringing the rest of mIRC up to 32bit from 16bit. (eg, 64K limits, Line Too Long, etc)

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#41557 16/08/03 04:23 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Yeah, doing 64bit arithmetic in a 32bit environment is slower. But Khaled could probably implement it in such a way that it only uses a 64bit integer if it is needed. Meaning use 32bit by default, use 64bit if 32bit is too small.

#41558 16/08/03 04:57 PM
Joined: Dec 2002
Posts: 117
R
Vogon poet
Offline
Vogon poet
R
Joined: Dec 2002
Posts: 117
2^32 - 1 = 4294967295, that is the greatest value a 32bit unsigned long can store smile


$input(Me like stars, You too?)

Link Copied to Clipboard