2014-12-12 22:59:28 +00:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2017-03-11 11:33:49 +00:00
|
|
|
| PHP Version 7 |
|
2014-12-12 22:59:28 +00:00
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| Copyright (c) 1997-2013 The PHP Group |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| http://www.opensource.org/licenses/mit-license.php MIT License |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| Author: Jani Taskinen <jani.taskinen@iki.fi> |
|
|
|
|
| Author: Patrick Reilly <preilly@php.net> |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef V8JS_TIMER_H
|
|
|
|
#define V8JS_TIMER_H
|
|
|
|
|
2014-12-12 23:43:19 +00:00
|
|
|
// Timer context
|
2014-12-13 00:15:29 +00:00
|
|
|
struct v8js_timer_ctx
|
2014-12-12 23:43:19 +00:00
|
|
|
{
|
|
|
|
long time_limit;
|
|
|
|
long memory_limit;
|
|
|
|
std::chrono::time_point<std::chrono::high_resolution_clock> time_point;
|
2014-12-13 00:15:29 +00:00
|
|
|
v8js_ctx *ctx;
|
2014-12-12 23:43:19 +00:00
|
|
|
bool killed;
|
|
|
|
};
|
|
|
|
|
2015-09-28 20:03:24 +00:00
|
|
|
void v8js_timer_thread(zend_v8js_globals *globals);
|
2017-03-11 12:35:21 +00:00
|
|
|
void v8js_timer_push(long time_limit, long memory_limit, v8js_ctx *c);
|
2014-12-12 22:59:28 +00:00
|
|
|
|
|
|
|
#endif /* V8JS_TIMER_H */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Local variables:
|
|
|
|
* tab-width: 4
|
|
|
|
* c-basic-offset: 4
|
2016-07-02 20:41:01 +00:00
|
|
|
* indent-tabs-mode: t
|
2014-12-12 22:59:28 +00:00
|
|
|
* End:
|
|
|
|
* vim600: noet sw=4 ts=4 fdm=marker
|
|
|
|
* vim<600: noet sw=4 ts=4
|
|
|
|
*/
|