Please enable JavaScript to use RhodeCode Enterprise
Commit Description:
add -s clone to run php
Commit Description:
add -s clone to run php
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
#include <time.h>
#include <sys/resource.h>
// run it for 1.5 s
int main ()
{
int a , b ;
int c = 0 ;
int r ;
r = scanf ( "%d %d" , & a , & b );
printf ( "%d \n " , a + b );
struct rusage ru ;
while ( 1 ) {
c ++ ;
b += c ;
while ( c < 100000 ) {
c ++ ;
b += c ;
}
getrusage ( RUSAGE_SELF , & ru );
double rtime = ru . ru_utime . tv_sec + ru . ru_stime . tv_sec ;
rtime += ( double ) ru . ru_utime . tv_usec / 1000000.0 ;
rtime += ( double ) ru . ru_stime . tv_usec / 1000000.0 ;
if ( rtime > 0.5 )
break ;
}
printf ( "%d \n " , b );
a += r ;
exit ( 0 );
}
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository permissions settings