File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212
1313#include " Types.h"
1414#include < csetjmp>
15- #include < jerryscript-port.h>
15+ #include < jerry-core/include/ jerryscript-port.h>
1616
1717namespace Jerryscript
1818{
Original file line number Diff line number Diff line change @@ -43,12 +43,12 @@ void jerry_port_log(jerry_log_level_t level, /**< log level */
4343}
4444
4545/* *
46- * Default implementation of jerry_port_get_current_time .
46+ * Default implementation of jerry_port_current_time .
4747 */
48- double jerry_port_get_current_time ()
48+ double jerry_port_current_time ()
4949{
5050 return RTC .getRtcNanoseconds () / 1e9 ;
51- } /* jerry_port_get_current_time */
51+ }
5252
5353/* *
5454 * Default implementation of jerry_port_get_local_time_zone_adjustment. Uses the 'tm_gmtoff' field
@@ -61,9 +61,24 @@ double jerry_port_get_current_time()
6161double jerry_port_get_local_time_zone_adjustment (double unix_ms, /* *< ms since unix epoch */
6262 bool is_utc) /* *< is the time above in UTC? */
6363{
64+ // TODO
6465 return 0.0 ;
6566}
6667
68+ /* *
69+ * Get the current system time in UTC.
70+ *
71+ * This port function is called by jerry-core when JERRY_BUILTIN_DATE is enabled.
72+ * It can also be used in the implementing application to initialize the random number generator.
73+ *
74+ * @return milliseconds since Unix epoch
75+ */
76+ int32_t jerry_port_local_tza (double unix_ms)
77+ {
78+ // TODO
79+ return 0 ;
80+ }
81+
6782/* *
6883 * Default implementation of jerry_port_fatal.
6984 */
@@ -97,3 +112,10 @@ jerry_context_t* jerry_port_get_current_context(void)
97112{
98113 return Jerryscript::Context::getCurrent ();
99114}
115+
116+ /* *
117+ * Init the program
118+ */
119+ void jerry_port_init (void )
120+ {
121+ }
You can’t perform that action at this time.
0 commit comments