get the time under ubuntu storage size

前端 未结 2 1891
滥情空心
滥情空心 2021-01-26 18:13

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

2条回答
  •  一个人的身影
    2021-01-26 18:38

    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.

提交回复
热议问题