Skip to content

Commit 3c4023e

Browse files
riptlripatel-fd
authored andcommitted
Retain fd_log_wallclock ABI compatibility
1 parent 46f6fa4 commit 3c4023e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/util/log/fd_log.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,13 +358,18 @@ fd_log_group_id_query( ulong group_id ) {
358358
/* WALLCLOCK APIS *****************************************************/
359359

360360
long
361-
_fd_log_wallclock( void const * _ ) {
362-
(void)_;
361+
fd_log_wallclock( void ) {
363362
struct timespec ts[1];
364363
clock_gettime( CLOCK_REALTIME, ts );
365364
return ((long)1e9)*((long)ts->tv_sec) + (long)ts->tv_nsec;
366365
}
367366

367+
long
368+
_fd_log_wallclock( void const * _ ) {
369+
(void)_;
370+
return fd_log_wallclock();
371+
}
372+
368373
char *
369374
fd_log_wallclock_cstr( long now,
370375
char * buf ) {

src/util/log/fd_log.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ extern ulong const fd_log_build_info_sz; /* == strlen( fd_log_build_info ) + 1UL
508508
involve system calls under the hood and is much slower than, say,
509509
RTSDC. */
510510

511-
#define fd_log_wallclock() _fd_log_wallclock( NULL )
511+
long fd_log_wallclock( void );
512512
long _fd_log_wallclock( void const * _ ); /* fd_clock_func_t compat */
513513

514514
/* fd_log_wallclock_cstr( t, buf ) pretty prints the wallclock

0 commit comments

Comments
 (0)