#include <stdio.h>
#include <inttypes.h>
#ifdef __cplusplus
# include <algorithm> //std::swap
#endif
#include <sys/resource.h>

int main(){
#ifdef SWAP
	int a=666, b=13;
	register int32_t i=0;
	do{//Bytt om a og b 2^32 ganger.
# if SWAP==0
		a ^= b;
		b ^= a;
		a ^= b;
# elif SWAP==1
#  ifndef __cplusplus
#  error "Dette er C++"
#  endif
		std::swap(a, b);
# elif SWAP==2
		int temp = a;
		a = b;
		b = temp;
# elif SWAP==3
		register int temp = a;
		a = b;
		b = temp;
# endif
	}while(++i);
	printf("%d %d\n", a, b);
#endif /*defined SWAP*/

#ifdef STR2INT
	char numstr[]="12388888";
	register int32_t i=0;
	int a;
	while(++i){
# if STR2INT==0
		a = strtol(numstr, NULL, 10);
		numstr[4] = '\0';
# elif STR2INT==1
		sscanf(numstr, "%d", &a);
		numstr[4] = '\0';
# endif
	}
#endif /*defined STR2INT*/
	struct rusage usage;
	if(getrusage(RUSAGE_SELF, &usage)){
		perror("Uffda.");
		_Exit(1);
	}
	printf("%ld.%06ld\n", usage.ru_stime.tv_sec, 
usage.ru_stime.tv_usec);
	printf("%ld.%06ld\n", usage.ru_utime.tv_sec, 
usage.ru_utime.tv_usec);
	return 0;
}


