feat: add time offset configuration
This commit is contained in:
@@ -333,6 +333,10 @@ namespace Montauk {
|
||||
return Sys_BtInfo((BtAdapterInfo*)frame->arg1);
|
||||
case SYS_SUSPEND:
|
||||
return Sys_Suspend();
|
||||
case SYS_SETTZ:
|
||||
return Sys_SetTZ((int32_t)frame->arg1);
|
||||
case SYS_GETTZ:
|
||||
return Sys_GetTZ();
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -174,6 +174,10 @@ namespace Montauk {
|
||||
/* Power.hpp */
|
||||
static constexpr uint64_t SYS_SUSPEND = 89;
|
||||
|
||||
/* Time.hpp */
|
||||
static constexpr uint64_t SYS_SETTZ = 90;
|
||||
static constexpr uint64_t SYS_GETTZ = 91;
|
||||
|
||||
static constexpr int SOCK_TCP = 1;
|
||||
static constexpr int SOCK_UDP = 2;
|
||||
|
||||
|
||||
@@ -29,4 +29,13 @@ namespace Montauk {
|
||||
out->Minute = dt.Minute;
|
||||
out->Second = dt.Second;
|
||||
}
|
||||
|
||||
static int64_t Sys_SetTZ(int32_t offsetMinutes) {
|
||||
Timekeeping::SetTZOffset(offsetMinutes);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int64_t Sys_GetTZ() {
|
||||
return (int64_t)Timekeeping::GetTZOffset();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user