Network Time Protocol for iPhone

前端 未结 7 2079
無奈伤痛
無奈伤痛 2020-11-30 04:38

I am writing an application that requires accurate timing. After asking this question, I have decided to investigate using NTP or maybe Simple NTP.

Is there any open

相关标签:
7条回答
  • 2020-11-30 05:31

    You can use that open source: https://github.com/huynguyencong/NHNetworkTime

    [[NHNetworkClock sharedNetworkClock] syncWithComplete:^{
            NSLog(@"%s - Time synced %@", __PRETTY_FUNCTION__, [NSDate networkDate]);
        }];
    

    And use:

    NSDate *networkDate = [NSDate networkDate];
    
    0 讨论(0)
提交回复
热议问题