[all] moved time and locking methods to the common library

This commit is contained in:
Geoffrey McRae
2020-01-17 14:35:08 +11:00
parent 278d851c7c
commit 4746c89227
13 changed files with 55 additions and 95 deletions

View File

@@ -19,7 +19,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "ll.h"
#include "utils.h"
#include "common/locking.h"
#include <stdlib.h>
#include <assert.h>
@@ -157,4 +157,4 @@ bool ll_walk(struct ll * list, void ** data)
LG_UNLOCK(list->lock);
return true;
}
}

View File

@@ -45,6 +45,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
#include "common/KVMFR.h"
#include "common/stringutils.h"
#include "common/thread.h"
#include "common/locking.h"
#include "common/event.h"
#include "common/ivshmem.h"
#include "common/time.h"
@@ -112,7 +113,7 @@ static void updatePositionInfo()
if (force && params.forceAspect)
{
state.resizeTimeout = getMicrotime() + RESIZE_TIMEOUT;
state.resizeTimeout = microtime() + RESIZE_TIMEOUT;
state.resizeDone = false;
}
}
@@ -219,7 +220,7 @@ static int renderThread(void * unused)
clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &time, NULL);
if (!state.resizeDone && state.resizeTimeout < getMicrotime())
if (!state.resizeDone && state.resizeTimeout < microtime())
{
SDL_SetWindowSize(
state.window,
@@ -1574,4 +1575,4 @@ int main(int argc, char * argv[])
config_free();
return ret;
}
}