Skip to content

Commit

Permalink
Added startTimeStamp to SessionData
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberneel committed Dec 20, 2024
1 parent 0e0e1f5 commit 7b8339c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/infinisleep/InfiniSleepController.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define SLEEP_CYCLE_DURATION 90 // sleep cycle duration in minutes
#define DESIRED_CYCLES 5 // desired number of sleep cycles
#define PUSHES_TO_STOP_ALARM_TIMEOUT 2 // in seconds
#define SESSION_DATA_VERSION 1 // Version of the session data struct
#define SESSION_DATA_VERSION 2 // Version of the session data struct

namespace Pinetime {
namespace System {
Expand All @@ -40,6 +40,8 @@ namespace Pinetime {

uint16_t totalSleepMinutes = 0;

uint32_t startTimeStamp = 0;

uint8_t version = SESSION_DATA_VERSION;
};
}
Expand Down Expand Up @@ -211,6 +213,7 @@ namespace Pinetime {
prevSessionData.day = dateTimeController.Day();
prevSessionData.month = static_cast<uint8_t>(dateTimeController.Month());
prevSessionData.year = dateTimeController.Year();
prevSessionData.startTimeStamp = dateTimeController.CurrentDateTime().time_since_epoch().count();
EnableTracker();
}
return isEnabled;
Expand Down

0 comments on commit 7b8339c

Please sign in to comment.