Update the webpage (#2334)

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó
2018-05-17 07:40:49 +02:00
committed by yichoi
parent dc12458382
commit f97f82f7be
9 changed files with 152 additions and 108 deletions
+28 -8
View File
@@ -21,7 +21,8 @@ It is questionable whether a library should be able to terminate an application.
*
* @param code gives the cause of the error.
*
* Note: jerry expects the function not to return.
* Note:
* Jerry expects the function not to return.
*
* Example: a libc-based port may implement this with exit() or abort(), or both.
*/
@@ -91,14 +92,26 @@ typedef struct
/**
* Get timezone and daylight saving data
*
* Note:
* This port function is called by jerry-core when
* CONFIG_DISABLE_DATE_BUILTIN is _not_ defined. Otherwise this function is
* not used.
*
* @param[out] tz_p time zone structure to fill.
* @return true - if success
* false - otherwise
*/
bool jerry_port_get_time_zone (jerry_time_zone_t *);
bool jerry_port_get_time_zone (jerry_time_zone_t *tz_p);
/**
* Get system time
*
* Note:
* This port function is called by jerry-core when
* CONFIG_DISABLE_DATE_BUILTIN is _not_ defined. It is also common practice
* in application code to use this function for the initialization of the
* random number generator.
*
* @return milliseconds since Unix epoch
*/
double jerry_port_get_current_time (void);
@@ -110,12 +123,13 @@ Allow user to provide external buffer for jerry instance (which includes an isol
```c
/**
* Get the current instance, which contains the current context, heap and other infomation.
* Each port should provide its own implementation of this interface.
* Get the current instance which contains the current context, heap and other
* structures. Each port should provide its own implementation of this interface.
*
*Note:
* This port function will be called automatically by jerry-core
* when JERRY_ENABLE_EXTERNAL_CONTEXT is defined. If not, this function will never be called.
* Note:
* This port function is called by jerry-core when
* JERRY_ENABLE_EXTERNAL_CONTEXT is defined. Otherwise this function is not
* used.
*
* @return the pointer to the jerry instance.
*/
@@ -127,6 +141,12 @@ struct jerry_instance_t *jerry_port_get_current_instance (void);
```c
/**
* Makes the process sleep for a given time.
*
* Note:
* This port function is called by jerry-core when JERRY_DEBUGGER is
* defined. Otherwise this function is not used.
*
* @param sleep_time milliseconds to sleep.
*/
void jerry_port_sleep (uint32_t sleep_time);
```
@@ -269,7 +289,7 @@ void jerry_port_sleep (uint32_t sleep_time)
#ifdef HAVE_TIME_H
nanosleep (&(const struct timespec)
{
sleep_time / 1000, (sleep_time % 1000) * 1000000L /* Seconds, nanoseconds */
(time_t) sleep_time / 1000, ((long int) sleep_time % 1000) * 1000000L /* Seconds, nanoseconds */
}
, NULL);
#elif defined (HAVE_UNISTD_H)