From: Martin Mares Date: Thu, 15 May 2008 09:58:08 +0000 (+0200) Subject: Moved timelib to examples/timelib. The misc directory is gone. X-Git-Tag: python-dummy-working~199 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=c07d34dd65776fc85423f6dc08cd1f3adfcda186;p=moe.git Moved timelib to examples/timelib. The misc directory is gone. --- diff --git a/examples/timelib/timelib.h b/examples/timelib/timelib.h new file mode 100644 index 0000000..ab37ec5 --- /dev/null +++ b/examples/timelib/timelib.h @@ -0,0 +1,5 @@ +#include + +static inline int cpspc_time(void) { + return clock() * 1000 / CLOCKS_PER_SEC; +} diff --git a/examples/timelib/timelib.pas b/examples/timelib/timelib.pas new file mode 100644 index 0000000..3e1dfcf --- /dev/null +++ b/examples/timelib/timelib.pas @@ -0,0 +1,8 @@ +unit timelib; +interface +function cpspc_time:longint;cdecl;external; +{$L timepas.o} +{$LinkLib c} +implementation +begin +end. diff --git a/examples/timelib/timepas.c b/examples/timelib/timepas.c new file mode 100644 index 0000000..000d22e --- /dev/null +++ b/examples/timelib/timepas.c @@ -0,0 +1,6 @@ +#include + +int cpspc_time(void) +{ + return clock() * 1000 / CLOCKS_PER_SEC; +} diff --git a/examples/timelib/timetest.c b/examples/timelib/timetest.c new file mode 100644 index 0000000..36a0009 --- /dev/null +++ b/examples/timelib/timetest.c @@ -0,0 +1,9 @@ +#include +#include "timelib.h" + +int main(void) +{ + int i; + for (i = 0; i <100000000; i++); + printf("%d\n", cpspc_time()); +} diff --git a/examples/timelib/timetest.pas b/examples/timelib/timetest.pas new file mode 100644 index 0000000..0d996e5 --- /dev/null +++ b/examples/timelib/timetest.pas @@ -0,0 +1,6 @@ +uses timelib; +var i:longint; +begin +for i:=1 to 100000000 do i := i; +writeln(cpspc_time); +end. diff --git a/misc/timelib.h b/misc/timelib.h deleted file mode 100644 index ab37ec5..0000000 --- a/misc/timelib.h +++ /dev/null @@ -1,5 +0,0 @@ -#include - -static inline int cpspc_time(void) { - return clock() * 1000 / CLOCKS_PER_SEC; -} diff --git a/misc/timelib.pas b/misc/timelib.pas deleted file mode 100644 index 3e1dfcf..0000000 --- a/misc/timelib.pas +++ /dev/null @@ -1,8 +0,0 @@ -unit timelib; -interface -function cpspc_time:longint;cdecl;external; -{$L timepas.o} -{$LinkLib c} -implementation -begin -end. diff --git a/misc/timepas.c b/misc/timepas.c deleted file mode 100644 index 000d22e..0000000 --- a/misc/timepas.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int cpspc_time(void) -{ - return clock() * 1000 / CLOCKS_PER_SEC; -} diff --git a/misc/timetest.c b/misc/timetest.c deleted file mode 100644 index 36a0009..0000000 --- a/misc/timetest.c +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include "timelib.h" - -int main(void) -{ - int i; - for (i = 0; i <100000000; i++); - printf("%d\n", cpspc_time()); -} diff --git a/misc/timetest.pas b/misc/timetest.pas deleted file mode 100644 index 0d996e5..0000000 --- a/misc/timetest.pas +++ /dev/null @@ -1,6 +0,0 @@ -uses timelib; -var i:longint; -begin -for i:=1 to 100000000 do i := i; -writeln(cpspc_time); -end.