summaryrefslogtreecommitdiff
path: root/gs/psi/zmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gs/psi/zmisc.c')
-rw-r--r--gs/psi/zmisc.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/gs/psi/zmisc.c b/gs/psi/zmisc.c
index a832a0ae0..aae51e6ad 100644
--- a/gs/psi/zmisc.c
+++ b/gs/psi/zmisc.c
@@ -170,26 +170,17 @@ zserialnumber(i_ctx_t *i_ctx_p)
return 0;
}
-/* some FTS tests work better if realtime starts from 0 at boot time */
-static long real_time_0[2];
-
-static int
-zmisc_init_realtime(i_ctx_t * i_ctx_p)
-{
- gp_get_realtime(real_time_0);
- return 0;
-}
-
/* - realtime <int> */
static int
zrealtime(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
long secs_ns[2];
+ gs_lib_ctx_t *libctx = gs_lib_ctx_get_interp_instance(imemory);
gp_get_realtime(secs_ns);
- secs_ns[1] -= real_time_0[1];
- secs_ns[0] -= real_time_0[0];
+ secs_ns[1] -= libctx->real_time_0[1];
+ secs_ns[0] -= libctx->real_time_0[0];
push(1);
make_int(op, secs_ns[0] * 1000 + secs_ns[1] / 1000000);
return 0;
@@ -521,5 +512,5 @@ const op_def zmisc_op_defs[] =
{"2.pcacheinsert", zpcacheinsert},
{"1.pcachequery", zpcachequery},
#endif
- op_def_end(zmisc_init_realtime)
+ op_def_end(0)
};