summaryrefslogtreecommitdiff
path: root/platform/darwin/src/NSDate+MGLAdditions.mm
blob: deac3c4881e32625726cbb8dbf870c304238c553 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#import "NSDate+MGLAdditions.h"

@implementation NSDate (MGLAdditions)

mbgl::Duration MGLDurationInSecondsFromTimeInterval(NSTimeInterval duration)
{
    return std::chrono::duration_cast<mbgl::Duration>(std::chrono::duration<NSTimeInterval>(duration));
}

NSTimeInterval MGLTimeIntervalFromDurationInSeconds(mbgl::Duration duration)
{
    return duration.count();
}

@end