mirror of
https://github.com/cathugger/mkp224o.git
synced 2025-04-20 13:59:11 +00:00
some tweaks
This commit is contained in:
parent
5b4074a47e
commit
90fe9f35d1
2 changed files with 2 additions and 5 deletions
3
ioutil.c
3
ioutil.c
|
@ -161,7 +161,6 @@ skipdsync:
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
|
||||
int writeall(FH fd,const u8 *data,size_t len)
|
||||
|
@ -202,8 +201,6 @@ int createdir(const char *path,int secret)
|
|||
return CreateDirectoryA(path,0) ? 0 : -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int syncwrite(const char *filename,int secret,const char *data,size_t datalen)
|
||||
{
|
||||
VEC_STRUCT(,char) tmpname;
|
||||
|
|
4
main.c
4
main.c
|
@ -220,7 +220,7 @@ static void *checkpointworker(void *arg)
|
|||
clock_gettime(CLOCK_MONOTONIC,&nowtime);
|
||||
inowtime = (1000000 * (u64)nowtime.tv_sec) + ((u64)nowtime.tv_nsec / 1000);
|
||||
|
||||
if (inowtime - ilasttime >= 300 * 1000000 /* 5 minutes */) {
|
||||
if ((i64)(inowtime - ilasttime) >= 300 * 1000000 /* 5 minutes */) {
|
||||
savecheckpoint();
|
||||
ilasttime = inowtime;
|
||||
}
|
||||
|
@ -718,7 +718,7 @@ int main(int argc,char **argv)
|
|||
VEC_BUF(tstats,i).numrestart += (u64)tdiff;
|
||||
sumrestart += VEC_BUF(tstats,i).numrestart;
|
||||
}
|
||||
if (reportdelay && (!ireporttime || inowtime - ireporttime >= reportdelay)) {
|
||||
if (reportdelay && (!ireporttime || (i64)(inowtime - ireporttime) >= (i64)reportdelay)) {
|
||||
if (ireporttime)
|
||||
ireporttime += reportdelay;
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue