diff options
author | tomsmeding <hallo@tomsmeding.nl> | 2015-09-10 15:51:19 +0200 |
---|---|---|
committer | tomsmeding <hallo@tomsmeding.nl> | 2015-09-10 15:51:19 +0200 |
commit | 38921ae6d41c8e50676aa8b01eaf701939d64573 (patch) | |
tree | 35367b78f9b3266caae57d50b92f5551e1040145 /postrun.cpp | |
parent | 22b84da031e21041a15584a8982c4c4c7b7f68ff (diff) | |
parent | 74151599d4107055c6d8ecef05ad9cbd6b2045bb (diff) |
Merge branch 'master' into tetris
merge array stuff into tetris
Diffstat (limited to 'postrun.cpp')
-rw-r--r-- | postrun.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/postrun.cpp b/postrun.cpp index eda3714..2c3c97f 100644 --- a/postrun.cpp +++ b/postrun.cpp @@ -2,6 +2,7 @@ #include <fstream> #include <vector> #include <string> +#include <sys/time.h> #include "runtime.h" @@ -32,6 +33,11 @@ int main(int argc,char **argv){ cerr<<"Could not open file '"<<argv[1]<<"'"<<endl; return 1; } + + struct timeval tv; + gettimeofday(&tv,NULL); + srand(tv.tv_sec*1000000+tv.tv_usec); + //string source=readfile(srcf); try { const vector<string> tokens=tokenise(srcf); |