Skip to content
This repository has been archived by the owner on Nov 9, 2021. It is now read-only.

Commit

Permalink
Fix build break
Browse files Browse the repository at this point in the history
gcc 4.5.1 on Solaris i386 is crashing while compiling shell.c. This works around the compiler bug.


git-svn-id: svn+ssh://source-control.beyondtrust.com/sources/repo/bt-dev/trunk/Platform/src/linux@61688 9fc1c11e-11b2-4e14-94d8-6c5e05775969
  • Loading branch information
CORP\kstemen authored and CORP\kstemen committed Sep 1, 2011
1 parent f86c9cd commit e6fb020
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sqlite/src/shell.c
Expand Up @@ -100,10 +100,14 @@ static double timeDiff(struct timeval *pStart, struct timeval *pEnd){
static void endTimer(void){
if( enableTimer ){
struct rusage sEnd;
double userTime, sysTime;

getrusage(RUSAGE_SELF, &sEnd);
userTime = timeDiff(&sBegin.ru_utime, &sEnd.ru_utime);
sysTime = timeDiff(&sBegin.ru_stime, &sEnd.ru_stime);
printf("CPU Time: user %f sys %f\n",
timeDiff(&sBegin.ru_utime, &sEnd.ru_utime),
timeDiff(&sBegin.ru_stime, &sEnd.ru_stime));
userTime,
sysTime);
}
}
#define BEGIN_TIMER beginTimer()
Expand Down

0 comments on commit e6fb020

Please sign in to comment.