mirror of
https://github.com/InfiniTimeOrg/InfiniTime.git
synced 2024-10-22 15:11:51 +02:00
Add PushCurrentTicks
This commit is contained in:
parent
b55b59ea13
commit
ff4607c6da
|
@ -351,7 +351,7 @@ void ASM::run() {
|
|||
break;
|
||||
}
|
||||
|
||||
case OpcodeShort::PushCurrentTime: {
|
||||
case OpcodeShort::PushCurrentDateTime: {
|
||||
auto time = dateTimeController.CurrentDateTime();
|
||||
std::tm tm {
|
||||
.tm_sec = dateTimeController.Seconds(),
|
||||
|
@ -368,6 +368,10 @@ void ASM::run() {
|
|||
break;
|
||||
}
|
||||
|
||||
case OpcodeShort::PushCurrentTicks:
|
||||
push(std::make_shared<ValueInteger>((xTaskGetTickCount() * configTICK_RATE_HZ) / 1000));
|
||||
break;
|
||||
|
||||
case OpcodeShort::FormatDateTime: {
|
||||
auto fmt = pop<ValueString>(String);
|
||||
auto time = pop<ValueDateTime>(DateTime);
|
||||
|
|
|
@ -144,7 +144,8 @@ namespace Pinetime {
|
|||
PushU24,
|
||||
PushU32,
|
||||
PushEmptyString,
|
||||
PushCurrentTime,
|
||||
PushCurrentDateTime,
|
||||
PushCurrentTicks,
|
||||
Duplicate,
|
||||
Pop,
|
||||
LoadString,
|
||||
|
|
Loading…
Reference in a new issue