2,000th topic
- Primis
- Member
- Posts: 62
- Joined: Fri May 14, 2010 3:46 pm
- Libera.chat IRC: Primis
- Location: New York, NY
- Contact:
2,000th topic
Since this is the 2,000th topic in this forum , lets talk about the Y2k bug, or more specifically what caused it. So I ask, how do you keep track of the time and date in your OS?
Last edited by Primis on Tue Aug 24, 2010 7:21 pm, edited 1 time in total.
Re: 2,000th topic
That would be the Y0.2K bug.Since this is the 2,00th topic
Seriously though, to save space in my kernel, I use a single bit to represent the number of years since 2009. I've been testing for more than 12 months now and have seen no problems with this approach so far.
If a trainstation is where trains stop, what is a workstation ?
- Primis
- Member
- Posts: 62
- Joined: Fri May 14, 2010 3:46 pm
- Libera.chat IRC: Primis
- Location: New York, NY
- Contact:
Re: 2,000th topic
Whoops, typo! Fixed it though. So is that a signed bit or non? you would think people would want to access dates prior (think 30 year loan tracker).
Re: 2,000th topic
From the jump table, item 65:
GetDate rd 1 ; 65. return : EAX=century, year, month,day, each a byte in bcd format.
GetDate rd 1 ; 65. return : EAX=century, year, month,day, each a byte in bcd format.
Re: 2,000th topic
At the moment, it's going to tell you "not implemented".
- thepowersgang
- Member
- Posts: 734
- Joined: Tue Dec 25, 2007 6:03 am
- Libera.chat IRC: thePowersGang
- Location: Perth, Western Australia
- Contact:
Re: 2,000th topic
I'm just going to combo break these joke answers and give actually how I do it
My current method is to internally keep a Signed 64-bit count of milliseconds as the primary timestamp format. There is also a 32-bit "part-milliseconds" count that is used in the timekeeping code.
(Which makes the internal representation a 64.32 millisecond count)
My current method is to internally keep a Signed 64-bit count of milliseconds as the primary timestamp format. There is also a 32-bit "part-milliseconds" count that is used in the timekeeping code.
(Which makes the internal representation a 64.32 millisecond count)
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc