Diff

util-src/time.c @ 10480:94cacf9fd0ae

util.*.c: Add static qualifiers everywhere
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 01 Dec 2019 20:25:20 +0100
parent 9680:a374905e99ff
child 12976:a187600ec7d6
line wrap: on
line diff
--- a/util-src/time.c	Sun Dec 01 23:34:49 2019 +0100
+++ b/util-src/time.c	Sun Dec 01 20:25:20 2019 +0100
@@ -5,18 +5,18 @@
 #include <time.h>
 #include <lua.h>
 
-lua_Number tv2number(struct timespec *tv) {
+static lua_Number tv2number(struct timespec *tv) {
 	return tv->tv_sec + tv->tv_nsec * 1e-9;
 }
 
-int lc_time_realtime(lua_State *L) {
+static int lc_time_realtime(lua_State *L) {
 	struct timespec t;
 	clock_gettime(CLOCK_REALTIME, &t);
 	lua_pushnumber(L, tv2number(&t));
 	return 1;
 }
 
-int lc_time_monotonic(lua_State *L) {
+static int lc_time_monotonic(lua_State *L) {
 	struct timespec t;
 	clock_gettime(CLOCK_MONOTONIC, &t);
 	lua_pushnumber(L, tv2number(&t));