/in/foo.cc:11:9: error: 'clock_t stime' redeclared as different kind of symbol
clock_t stime = clock();
^~~~~
In file included from /usr/include/c++/6/ctime:42:0,
from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:49,
from /in/foo.cc:1:
/usr/include/time.h:304:12: note: previous declaration 'int stime(const time_t*)'
extern int stime (const time_t *__when) __THROW;
^~~~~
/in/foo.cc: In function 'void opt3()':
/in/foo.cc:13:28: error: invalid operands of types 'clock_t {aka long int}' and 'int(const time_t*) throw () {aka int(const long int*) throw ()}' to binary 'operator-'
#define gettime() (clock() - stime)
~~~~~~~~^~~
/in/foo.cc:95:13: note: in expansion of macro 'gettime'
if (gettime() + 2 * avg2 > Limit)
^~~~~~~
/in/foo.cc: In function 'void opt2()':
/in/foo.cc:13:28: error: invalid operands of types 'clock_t {aka long int}' and 'int(const time_t*) throw () {aka int(const long int*) throw ()}' to binary 'operator-'
#define gettime() (clock() - stime)
~~~~~~~~^~~
/in/foo.cc:176:13: note: in expansion of macro 'gettime'
if (gettime() + 2 * avg2 > Limit)
^~~~~~~
/in/foo.cc: In function 'void approach()':
/in/foo.cc:13:28: error: invalid operands of types 'clock_t {aka long int}' and 'int(const time_t*) throw () {aka int(const long int*) throw ()}' to binary 'operator-'
#define gettime() (clock() - stime)
~~~~~~~~^~~
/in/foo.cc:267:12: note: in expansion of macro 'gettime'
while (gettime() + 2*avg3 <= Limit) {
^~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:13:28: error: invalid operands of types 'clock_t {aka long int}' and 'int(const time_t*) throw () {aka int(const long int*) throw ()}' to binary 'operator-'
#define gettime() (clock() - stime)
~~~~~~~~^~~
/in/foo.cc:298:51: note: in expansion of macro 'gettime'
cout << avg2 << ' ' << avg3 << ' ' << (float)(gettime()) / 1000 << '\n';
^~~~~~~