-/* $OpenBSD: btrace.c,v 1.36 2021/06/07 12:55:19 dv Exp $ */
+/* $OpenBSD: btrace.c,v 1.37 2021/06/23 11:24:01 dv Exp $ */
/*
* Copyright (c) 2019 - 2020 Martin Pieuchot <mpi@openbsd.org>
memcpy(&bt_devt.dtev_comm, getprogname(), sizeof(bt_devt.dtev_comm));
bt_devt.dtev_pid = getpid();
bt_devt.dtev_tid = getthrid();
+ clock_gettime(CLOCK_REALTIME, &bt_devt.dtev_tsp);
if (rbegin)
rule_eval(rbegin, &bt_devt);
if (dokstack)
kelf_close();
+ /* Update "fake" event for BEGIN/END */
+ clock_gettime(CLOCK_REALTIME, &bt_devt.dtev_tsp);
+
if (rend)
rule_eval(rend, &bt_devt);
else {