Add Schedule.playground, have fun!
This commit is contained in:
parent
b45944b5c5
commit
1c3cc5c4b0
|
@ -0,0 +1,24 @@
|
||||||
|
import PlaygroundSupport
|
||||||
|
import Schedule
|
||||||
|
|
||||||
|
PlaygroundPage.current.needsIndefiniteExecution = true
|
||||||
|
|
||||||
|
let t1 = Plan.after(1.second).do {
|
||||||
|
print("1 second passed!")
|
||||||
|
}
|
||||||
|
|
||||||
|
let t2 = Plan.after(1.minute, repeating: 0.5.seconds).do {
|
||||||
|
print("Ping!")
|
||||||
|
}
|
||||||
|
|
||||||
|
let t3 = Plan.every("one minute and ten seconds").do {
|
||||||
|
print("One minute and ten seconds have elapsed!")
|
||||||
|
}
|
||||||
|
|
||||||
|
let t4 = Plan.every(.monday, .tuesday, .wednesday, .thursday, .friday).at(6, 30).do {
|
||||||
|
print("Get up!")
|
||||||
|
}
|
||||||
|
|
||||||
|
let t5 = Plan.every(.june(14)).at("9:30").do {
|
||||||
|
print("Happy birthday!")
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<playground version='5.0' target-platform='macos'>
|
||||||
|
<timeline fileName='timeline.xctimeline'/>
|
||||||
|
</playground>
|
|
@ -72,6 +72,7 @@
|
||||||
629FAA702255D14800ED5D67 /* WeekdayTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeekdayTests.swift; sourceTree = "<group>"; };
|
629FAA702255D14800ED5D67 /* WeekdayTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WeekdayTests.swift; sourceTree = "<group>"; };
|
||||||
629FAA722255D1CA00ED5D67 /* PeriodTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PeriodTests.swift; sourceTree = "<group>"; };
|
629FAA722255D1CA00ED5D67 /* PeriodTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PeriodTests.swift; sourceTree = "<group>"; };
|
||||||
629FAA742255D6B100ED5D67 /* MonthdayTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MonthdayTests.swift; sourceTree = "<group>"; };
|
629FAA742255D6B100ED5D67 /* MonthdayTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MonthdayTests.swift; sourceTree = "<group>"; };
|
||||||
|
66274E9B2258F61800964B93 /* Schedule.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Schedule.playground; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.swift; };
|
||||||
OBJ_10 /* Bag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bag.swift; sourceTree = "<group>"; };
|
OBJ_10 /* Bag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bag.swift; sourceTree = "<group>"; };
|
||||||
OBJ_13 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
|
OBJ_13 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = "<group>"; };
|
||||||
OBJ_14 /* Interval.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Interval.swift; sourceTree = "<group>"; };
|
OBJ_14 /* Interval.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Interval.swift; sourceTree = "<group>"; };
|
||||||
|
@ -163,6 +164,7 @@
|
||||||
OBJ_5 = {
|
OBJ_5 = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
66274E9B2258F61800964B93 /* Schedule.playground */,
|
||||||
OBJ_6 /* Package.swift */,
|
OBJ_6 /* Package.swift */,
|
||||||
OBJ_7 /* Sources */,
|
OBJ_7 /* Sources */,
|
||||||
OBJ_24 /* Tests */,
|
OBJ_24 /* Tests */,
|
||||||
|
|
Loading…
Reference in New Issue