Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bsiever committed Sep 5, 2022
1 parent 4b6fc26 commit 72d30f3
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions timeanddate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ namespace timeanddate {
if (lastUpdateMinute < t.minute) {
const expectedAdjustmentSoFar = Math.trunc((t.hour * 60 + t.minute) / (24.0 * 60) * dailyAdjustment)
const short = expectedAdjustmentSoFar - adjustmentToday
serial.writeLine("Expected: " + expectedAdjustmentSoFar)
serial.writeLine("Adjusted Already: " + adjustmentToday)
serial.writeLine("short: " + short)
// serial.writeLine("Expected: " + expectedAdjustmentSoFar)
// serial.writeLine("Adjusted Already: " + adjustmentToday)
// serial.writeLine("short: " + short)
adjustmentToday += short
advanceBy(short, TimeUnit.Seconds)
}
Expand All @@ -45,8 +45,8 @@ namespace timeanddate {
// Finish up any adjustments
const short = dailyAdjustment - adjustmentToday
advanceBy(short, TimeUnit.Milliseconds)
serial.writeLine("Adjusted Already: " + adjustmentToday)
serial.writeLine("short: " + short)
// serial.writeLine("Adjusted Already: " + adjustmentToday)
// serial.writeLine("short: " + short)
adjustmentToday = 0
lastUpdateMinute = 0 // Already did minute update
}
Expand Down Expand Up @@ -533,7 +533,6 @@ namespace timeanddate {
//% weight=5
export function setDailyAdjustment(adjustment: number) {
dailyAdjustment = adjustment

const cpuTime = cpuTimeInSeconds()
const t = timeFor(cpuTime)
// Compute how much of today's adjustment is past
Expand Down

0 comments on commit 72d30f3

Please sign in to comment.