MCPcopy Create free account
hub / github.com/defold/defold / buffer_meth_getstats

Function buffer_meth_getstats

engine/script/src/luasocket/buffer.c:53–58  ·  view source on GitHub ↗

-------------------------------------------------------------------------*\ * object:getstats() interface \*-------------------------------------------------------------------------*/

Source from the content-addressed store, hash-verified

51* object:getstats() interface
52\*-------------------------------------------------------------------------*/
53int buffer_meth_getstats(lua_State *L, p_buffer buf) {
54 lua_pushnumber(L, (lua_Number) buf->received);
55 lua_pushnumber(L, (lua_Number) buf->sent);
56 lua_pushnumber(L, timeout_gettime() - buf->birthday);
57 return 3;
58}
59
60/*-------------------------------------------------------------------------*\
61* object:setstats() interface

Callers 3

meth_getstatsFunction · 0.85
meth_getstatsFunction · 0.85
meth_getstatsFunction · 0.85

Calls 2

lua_pushnumberFunction · 0.85
timeout_gettimeFunction · 0.85

Tested by

no test coverage detected