Is the gettimeofday function thread safe in Linux?

后端 未结 4 2095
无人共我
无人共我 2020-12-17 23:00

The current time must be stored globally in order for gettimeofday to work, however I am not sure if the function modifies any global state so that concurrent execution is u

4条回答
  •  一向
    一向 (楼主)
    2020-12-17 23:44

    No data is modified with this call. You just get a copy. Hence its completely thread safe.

提交回复
热议问题