anyone know any time algorithms?

UlricT

Golden Member
Jul 21, 2002
1,966
0
0
I have been mucking about trying to build an algorithm from scratch for time calculations. I just realized that someone would have already done this, and this is the first place I thought of asking :)

What I specifically need is an algorithm that allows me to work on time (hr:min:sec) as 3 seperate integer values. The values will have to be multiplied, divided etc... and their ratios also have to be found. The sticky part for me is how to specify when the lower value (minutes --> seconds) have to be incremented and by how much...

Side Q:
anyone know why g++ is giving me an error when I do (float_A % float_B)?
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
mod is an integer operator. Offhand I don't know of any time-math class, but Google probably does.
 

Barnaby W. Füi

Elite Member
Aug 14, 2001
12,343
0
0
Boost's date/time library looked promising, although its design and documentation was a bit confusing to me.