Get current date in milliseconds

前端 未结 12 774
别跟我提以往
别跟我提以往 2020-12-04 10:23

Can any one give me an idea how to get the current date in milliseconds?

12条回答
  •  Happy的楠姐
    2020-12-04 11:08

    You can use following methods to get current date in milliseconds.

    [[NSDate date] timeIntervalSince1970];
    

    OR

    double CurrentTime = CACurrentMediaTime(); 
    

    Source: iPhone: How to get current milliseconds?

提交回复
热议问题