v8js_timer.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2013 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | http://www.opensource.org/licenses/mit-license.php MIT License |
  8. +----------------------------------------------------------------------+
  9. | Author: Jani Taskinen <[email protected]> |
  10. | Author: Patrick Reilly <[email protected]> |
  11. +----------------------------------------------------------------------+
  12. */
  13. #ifndef V8JS_TIMER_H
  14. #define V8JS_TIMER_H
  15. // Timer context
  16. struct php_v8js_timer_ctx
  17. {
  18. long time_limit;
  19. long memory_limit;
  20. std::chrono::time_point<std::chrono::high_resolution_clock> time_point;
  21. php_v8js_ctx *v8js_ctx;
  22. bool killed;
  23. };
  24. void v8js_timer_thread(TSRMLS_D);
  25. void v8js_timer_push(long time_limit, long memory_limit, php_v8js_ctx *c TSRMLS_DC);
  26. #endif /* V8JS_TIMER_H */
  27. /*
  28. * Local variables:
  29. * tab-width: 4
  30. * c-basic-offset: 4
  31. * End:
  32. * vim600: noet sw=4 ts=4 fdm=marker
  33. * vim<600: noet sw=4 ts=4
  34. */