[chuck-users] easy random numbers

Scott Wheeler wheeler at kde.org
Tue Nov 20 19:56:12 EST 2007


Kassen wrote:
>
> Really? this might sound naive but I feel it's up to the OS to keep 
> track of those. The little clocks at the bottom of the desktop can 
> have the time, why not some arbitrary program?

Sure -- you can do that -- as long as you don't actually want to do 
anything with the time other than print it.  ;-)

As you said, you don't have any purpose in mind for date / time support, 
but most of the time people working with dates / times do in fact have 
something in mind that they want to do.  Here are a couple examples of 
date / time APIs:

http://doc.trolltech.com/4.3/time.html
http://www.boost.org/doc/html/date_time.html

But let's say that you want your ChucKoo clock to let you sleep in on 
Saturday.  Well, then you need your date / time class to be able to 
report the day of the week.  Or if you want to say, "How much time is 
there between now and tomorrow at noon?"  You need to have API support 
for adding and subtracting time.

-Scott


More information about the chuck-users mailing list