How to get the time of the day in C?

Alvaro Hui hui at shiva.trl.oz
Fri Jan 11 16:36:52 AEST 1991


Hi all experts:

 I am writing a small program to generate random numbers in C and
an idea came up in my mind: it is a good idea to use the time of the
day as seed to my random generator!

 Unfortunately, I "man -k time" and search through all my 'C' books
and couldn't came up an idea how to get current time in C.

 Can some of you folks help me?

 Thanks in advance!

Alvaro,

a.hui at trl.oz.au.

===============================================================================
	Alvaro Hui		|ACSnet,	hui at rhea.trl.oz.au
    4th Year B.E.\ B.Sc.	|Internet &	akkh at mullian.ee.mu.OZ.AU
   University of Melbourne	|Arpanet	rcoahk at koel.co.rmit.OZ.AU 



More information about the Comp.unix.programmer mailing list