Finished getting JerryScript on all the platforms.

This commit is contained in:
2026-04-28 13:59:46 -05:00
parent 73e7d6c7f3
commit bd4200e707
15 changed files with 210 additions and 10 deletions
+2 -1
View File
@@ -20,4 +20,5 @@ add_subdirectory(log)
add_subdirectory(display)
add_subdirectory(input)
add_subdirectory(network)
add_subdirectory(system)
add_subdirectory(system)
add_subdirectory(time)
+9
View File
@@ -0,0 +1,9 @@
# Copyright (c) 2026 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
target_sources(${DUSK_LIBRARY_TARGET_NAME}
PUBLIC
timedolphin.c
)
+24
View File
@@ -0,0 +1,24 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#include "time/timedolphin.h"
double_t timeGetRealDolphin(void) {
// "Returns time in ticks since 2000"
u64 timeInMillis = PPCTicksToMs(SYS_Time());
double_t timeSeconds = (double_t)timeInMillis / 1000.0;
// Time to adjust time from 2000 to 1970, in seconds
double_t timeOffset = 946684800.0;
timeSeconds += timeOffset;
return timeSeconds;
}
double_t timeGetRealTimeZoneDolphin(void) {
return 0.0;
}
+23
View File
@@ -0,0 +1,23 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "dusk.h"
/**
* Returns the real current time, in seconds since January 1, 1970.
*
* @return The real current time, in seconds since January 1, 1970.
*/
double_t timeGetRealDolphin(void);
/**
* Returns the real time zone offset in seconds from UTC.
*
* @return The real time zone offset in seconds from UTC.
*/
double_t timeGetRealTimeZoneDolphin(void);
+12
View File
@@ -0,0 +1,12 @@
/**
* Copyright (c) 2026 Dominic Masters
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
#pragma once
#include "time/timedolphin.h"
#define timeGetRealPlatform timeGetRealDolphin
#define timeGetRealTimeZonePlatform timeGetRealTimeZoneDolphin