mIRC Home    About    Download    Register    News    Help

Print Thread
#41854 14/08/03 11:50 PM
Joined: Dec 2002
Posts: 343
D
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 343
Right now it currently does something like the below for the topic set time.

[16:46] * Set by Nickname on Wed Jan 01 12:12:12

Some topics are extremely old. And I think it would be beneficial to have the year included so it's like the below.

[16:46] * Set by Nickname on Wed Jan 01 12:12:12 2003

#41855 15/08/03 03:59 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Thats rather easily scriptable though. The script to do it would be 1 line long.

raw 333:*:echo $color(topic) -tlrbf $2 Set by $3 on $asctime($4,ddd mmm HH:nn:ss yyyy) | halt

#41856 15/08/03 05:56 PM
Joined: Dec 2002
Posts: 343
D
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 343
But I think this is one of those things that needs to be modified instead of relying on scripting to fix it.

#41857 15/08/03 06:00 PM
Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
id personally rather see things like 49 day uptime limit get fixed , ability to add a docked button list under the nicklist, updated colors ability added (more than defualt16). rather than worry about how long ago a topic was actually set.


D3m0nnet.com
#41858 15/08/03 06:06 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
I really don't understand why people won't accept that the 49 day uptime limit CAN NOT BE FIXED. It is a limitation of WINDOWS NOT MIRC. There must be at least a dozen posts that say that exact thing!

#41859 16/08/03 02:43 PM
Joined: Dec 2002
Posts: 56
W
Babel fish
Offline
Babel fish
W
Joined: Dec 2002
Posts: 56
That's not entirely true. Using QueryPerformanceCounter() and QueryPerformanceFrequency() with a LARGE_INTEGER allows you to retrieve rediculously high uptimes. If you have c as the counter, and f as the frequency, you can obtain the uptime in seconds via "c.QuadPart / f.QuadPart" Currently, I store it as an __int64, as I don't expect Windows to achieve an uptime that high. Even a 32 bit integer allows for over 136 years.


Acquire. Analyze. Adapt.
#41860 16/08/03 04:16 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well you're right, but not totally right. Not all systems support that. There is the possibility that the hardware installed on a particular system doesn't support a high-resolution performance counter. In which case, QueryPerformanceFrequency will return a value of 0. Additionally, on multiprocessor systems, it is possible (according to MSDN) that bugs in certain BIOS chips can cause incorrect results depending on which processor is queried. This means that you can't be guaranteed that the value returned is the correct value.

#41861 17/08/03 09:39 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Of corse, Khaled could always make a work-around by storing the $ctime value in accordance to each $uptime stat, then do basic $ctime - %ctime instead of relying on the windows counter.

Yes, it will only be ac accurate as your system clock, but $uptime was never really that accurate to begin with.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#41862 18/08/03 07:02 AM
Joined: Dec 2002
Posts: 343
D
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
D
Joined: Dec 2002
Posts: 343
But ctime doesn't yield milliseconds. And what if you open mIRC up after the initial 49 days?

#41863 18/08/03 02:18 PM
Joined: Dec 2002
Posts: 43
P
Ameglian cow
Offline
Ameglian cow
P
Joined: Dec 2002
Posts: 43
I am probably wrong but this could also be a processor limitation. When functions, in any language I ever heard of, return a value, it is returned in the AX, or EAX registers of the processor. This can be a pointer, a number, a character, or something else, but it will be no more than 32 bits. If the function returns an integer, not a pointer to an integer, the largest value it could return is 4,294,967,295. The number of milliseconds in 49 days is 4,233,600,000. Most people will not want to use non-standard functions because, if you run the program on a windows platform that the function is not supported on, then the program either won't start, or it will perform an illegal operation. If M$ decided to return an integer instead of a pointer to an integer this does become a windows problem, but it is one that cannot be changed. Since M$ decided to return this value as an integer that represents milliseconds, the longest it will go is for 49 days. I know that there are larger integers in most common OOP languages, but things like the int64 are pointers to larger values, or they could possibly return the value in EAX:EDX. I know that some assembly commands return the values in EAX:EDX, but C/C++ does not, it just returns a value in the EAX register, so most likely that is a pointer to an integer.


Link Copied to Clipboard