I\'m writing a program in C-language which its a simulation program for one barbershop one chair model under Ubuntu 13.04 environment .
I have a timer () function which
You seem to be trying to run MS-DOS / Turbo-C code on Linux?
There's no struct time
and gettime()
function in the Unix C library, you're probably looking for struct tm
and localtime()
instead, see e.g.:
http://www.tutorialspoint.com/c_standard_library/c_function_localtime.htm
If you are on ubuntu, you can just do:
srand(time(NULL));
You don't need your own timer()
function. If you need more fine resolution than 1 second, look into gettimeofday
.