aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/tracepoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/gdbserver/tracepoint.c')
-rw-r--r--gdb/gdbserver/tracepoint.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index 7700ad1..1444a0d 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -25,7 +25,7 @@
#include <ctype.h>
#include <fcntl.h>
#include <unistd.h>
-#include "gdb_sys_time.h"
+#include <chrono>
#include <inttypes.h>
#include "ax.h"
#include "tdesc.h"
@@ -7410,12 +7410,10 @@ getauxval (unsigned long type)
static LONGEST
get_timestamp (void)
{
- struct timeval tv;
+ using namespace std::chrono;
- if (gettimeofday (&tv, 0) != 0)
- return -1;
- else
- return (LONGEST) tv.tv_sec * 1000000 + tv.tv_usec;
+ steady_clock::time_point now = steady_clock::now ();
+ return duration_cast<microseconds> (now.time_since_epoch ()).count ();
}
void