]> rtime.felk.cvut.cz Git - ert_linux.git/commitdiff
Do not use 64 bit integer
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 23 Jul 2013 11:56:49 +0000 (13:56 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 23 Jul 2013 11:56:49 +0000 (13:56 +0200)
If the code generation is configured for 32 bit architecture, uint64_T type
is not defined.

ert_linux/ert_linux_multitasking_main.tlc

index 3308b960a906052d17427b6792664017397655f7..fb8eed10a8f9d9178a0df2ea2b13a97262ea8cc3 100644 (file)
        clock_gettime(CLOCK_MONOTONIC, &now);\r
        if (now.tv_sec > next.tv_sec ||\r
            (now.tv_sec == next.tv_sec && now.tv_nsec > next.tv_nsec)) {\r
-         uint64_T nsec = (now.tv_sec - next.tv_sec) * 1000000000 + now.tv_nsec - next.tv_nsec;\r
-         fprintf(stderr, "Base rate (%<fundamentalStepSize>s) overrun by %d us\n", (int)(nsec/1000));\r
+         uint32_T usec = (now.tv_sec - next.tv_sec) * 1000000 + (now.tv_nsec - next.tv_nsec)/1000;\r
+         fprintf(stderr, "Base rate (%<fundamentalStepSize>s) overrun by %d us\n", usec);\r
          next = now;\r
          continue;\r
        }\r