]> git.meshlink.io Git - meshlink/blobdiff - src/route.c
Remove global variable "now".
[meshlink] / src / route.c
index 21559728eecae0e261fdf374dc2d0825ba4dc3fd..68873096e76afde29429ab0f76e74806f56b06bf 100644 (file)
@@ -31,11 +31,11 @@ static bool ratelimit(int frequency) {
        static time_t lasttime = 0;
        static int count = 0;
 
-       if(lasttime == now.tv_sec) {
+       if(lasttime == mesh->loop.now.tv_sec) {
                if(count >= frequency)
                        return true;
        } else {
-               lasttime = now.tv_sec;
+               lasttime = mesh->loop.now.tv_sec;
                count = 0;
        }