TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Kurt Kuzba
from: Tom Torfs
date: 1998-09-27 23:57:28
subject: Division by time?!

Kurt Kuzba wrote in a message to Eric Cartmel:

 KK>    You need a function to adjust the data.
 KK>    You could write one easily, or you could convert the struct   
 KK> to a time_t variable using the standard function mktime(),    add
 KK> the seconds to that, and convert the time_t variable to    a struct
 KK> tm using the standard localtime() function.

Not necessary; mktime() adjusts the ranges of the tm structure it is
passed. I keep wondering why so many people make things so difficult, when
they are so easy :-)

(BTW: your code assumed time_t is expressed in seconds; this is not
guaranteed, hence the need for difftime())

greetings,
Tom
tomtorfs{at}village.uunet.be

--- timEd/2 1.10+
* Origin: 80X86 BBS 32-15-24.62.32 V.34/V.FC (24h/24h) (2:292/516)
SEEN-BY: 396/1 632/0 371 633/260 267 270 371 634/397 635/506 728 810 639/252
SEEN-BY: 670/218
@PATH: 292/516 106/1 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.