tizen 2.4 release accepted/tizen_2.4_mobile tizen_2.4 accepted/tizen/2.4/mobile/20151029.033917 submit/tizen_2.4/20151028.063901 tizen_2.4_mobile_release
authorjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 07:31:38 +0000 (16:31 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Sat, 24 Oct 2015 07:31:38 +0000 (16:31 +0900)
util_func.c

index 992ef9f..e3a2a58 100755 (executable)
@@ -22,6 +22,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <errno.h>
+#include <time.h>
 
 #include "util-func.h"
 #include "collation.h"
 static int __db_util_busyhandler(void *pData, int count)
 {
        if(5 - count > 0) {
+               struct timespec time = {
+                       .tv_sec = 0,
+                       .tv_nsec = (count + 1) * 100 * 1000 * 1000
+               };
                DB_UTIL_TRACE_DEBUG("Busy Handler Called! : PID(%d) / CNT(%d)\n", getpid(), count+1);
-               usleep((count+1)*100000);
+               nanosleep(&time, NULL);
                return 1;
        } else {
                DB_UTIL_TRACE_WARNING("Busy Handler will be returned SQLITE_BUSY error : PID(%d) \n", getpid());