Skip to content

Commit

Permalink
chore: add example
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicegginton committed Sep 1, 2024
1 parent 6351b47 commit 91f6ff3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ let package = Package(
],
targets: [
.target(name: "Nanoseconds"),
.testTarget(name: "NanosecondsTests", dependencies: ["Nanoseconds"])
.testTarget(name: "NanosecondsTests", dependencies: ["Nanoseconds"]),
.target(name: "Example", dependencies: ["Nanoseconds"])
]
)
8 changes: 8 additions & 0 deletions Sources/Example/main.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Foundation
import Nanoseconds

let start = Now()
sleep(1)
let end = Now()
let duration = end - start
print(duration)

0 comments on commit 91f6ff3

Please sign in to comment.