This commit is contained in:
Vladimir Dubovik
2025-06-13 11:59:16 +03:00
parent 2204bb9fe0
commit 5abafda21b
152 changed files with 9783 additions and 69 deletions

View File

@ -0,0 +1,29 @@
//
// Bridging.m
// TrueTime-iOS
//
// Created by Michael Sanders on 1/2/18.
// Copyright © 2018 Instacart. All rights reserved.
//
@import TrueTime;
@interface Bridging : NSObject
@end
@implementation Bridging
- (void)testBridging {
TrueTimeClient *client = [TrueTimeClient sharedInstance];
[client startWithPool:@[(id)[NSURL URLWithString:@"time.apple.com"]] port: 123];
NSDate *now = [[client referenceTime] now];
NSLog(@"True time: %@", now);
[client fetchIfNeededWithSuccess:^(NTPReferenceTime *referenceTime) {
NSLog(@"True time: %@", [referenceTime now]);
} failure:^(NSError *error) {
NSLog(@"Error! %@", error);
}];
}
@end