Use usleep rather than nanosleep

This commit is contained in:
Kovid Goyal
2021-01-03 05:00:40 +05:30
parent b3ed4c3f40
commit 18679348b2
3 changed files with 33 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ bool add_to_disk_cache(PyObject *self, const void *key, size_t key_sz, const voi
bool remove_from_disk_cache(PyObject *self_, const void *key, size_t key_sz);
void* read_from_disk_cache(PyObject *self_, const void *key, size_t key_sz, void*(allocator)(void*, size_t), void*);
bool disk_cache_wait_for_write(PyObject *self, monotonic_t timeout);
size_t disk_cache_size_on_disk(PyObject *self);
static inline void* disk_cache_malloc_allocator(void *x, size_t sz) {
*((size_t*)x) = sz;