Latest 1.0.2
License MIT
Platforms ios 9.0, osx 10.11, watchos 2.0, tvos 9.0

Build Status
CocoaPods Version
Carthage Compatible
Swift Version
GitHub license

WallClock is small framework contains structures suitable for tracking clock progress. It does not take into account the dates.


The main purpose of WallClock is to deal easily with clock units. You can sum or subtract WallClock and compare them.
It does not take into account the dates and it’s by design. If you are going to compare two distinct clocks in order to say which one
is displaying an earlier time you don’t need to know the date. You can compare them in an absolute way due to a clock is something
that take into account 24 * 3600 seconds. If you think about the clock as a flat timeline and a specific time a point onto the timeline,
then you can compare them in an absolute way.

Getting Started Base

let midnight = WallClock.midnight
let clock = WallClock(hours: ClockHours(23), minutes: ClockMinutes(12), seconds: ClockSeconds(45))
let test1 = WallClock(0) == midnight
let test2 = midnight < clock



pod 'WallClock'


github "falcon283/WallClock"


  • Gabriele Trabucco


This project is licensed under the MIT License – see the LICENSE file for details

Latest podspec

    "name": "WallClock",
    "version": "1.0.2",
    "summary": "A small library to operate with clock units.",
    "description": "This small library allows you to operate simply with a clock via a structure.nThe clock itself does not take into account the dates and it's purpouse it'snjust to represent and bundle together the clock units with the ability toncompare and sum the WallClock structures.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Gabriele Trabucco": "[email protected]"
    "platforms": {
        "ios": "9.0",
        "osx": "10.11",
        "watchos": "2.0",
        "tvos": "9.0"
    "source": {
        "git": "",
        "tag": "1.0.2"
    "source_files": "WallClock/Sources/**/*.{swift}",
    "swift_version": "4.0"

Pin It on Pinterest

Share This