Kronos
Elegant NTP date library in Swift
Install / Use
/learn @MobileNativeFoundation/KronosREADME
Kronos is an NTP client library written in Swift. It supports sub-seconds precision and provides a stable monotonic clock that won't be affected by changes in the clock.
Example app
This is an
example app that displays the monotonic Clock.now on the left and the
system clock (initially out of date) on the right.

Usage
Sync clock using a pool of NTP servers
Calling Clock.sync will fire a bunch of NTP requests to up to 5 of the
servers on the given NTP pool (default is time.apple.com). As soon as
we get the first response, the given closure is called but the Clock
will keep trying to get a more accurate response.
Clock.sync { date, offset in
// This is the first sync (note that this is the fastest but not the
// most accurate run
print(date)
}
Get an NTP sync'ed date
Clock.now is a monotonic NSDate that won't be affected by clock
changes.
NSTimer.scheduledTimerWithTimeInterval(1.0, target: self,
selector: #selector(Example.tick),
userInfo: nil, repeats: true)
@objc func tick() {
print(Clock.now) // Note that this clock will get more accurate as
// more NTP servers respond.
}
Installation
CocoaPods
Add Kronos to your Podfile:
pod 'Kronos'
Swift Package Manager
Add Kronos to your Package.swift:
.package(name: "Kronos", url: "https://github.com/MobileNativeFoundation/Kronos.git", .upToNextMajor(from: "TAG")),
Bazel
Add Kronos to your WORKSPACE:
http_archive(
name = "Kronos",
sha256 = "",
strip_prefix = "Kronos-TAG/",
url = "https://github.com/MobileNativeFoundation/Kronos/archive/TAG.tar.gz",
)
Then depend on @Kronos//:Kronos
Android
Check out Kronos for Android
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
