Skip to content

time.h on mac #5

Description

@xor256

cc -g -c -o main.o main.c -ltime
clang: warning: -ltime: 'linker' input unused
main.c:51:5: warning: implicit declaration of function 'clock_gettime' is
invalid in C99 [-Wimplicit-function-declaration]
clock_gettime(CLOCK_REALTIME, &start);
^
main.c:51:19: error: use of undeclared identifier 'CLOCK_REALTIME'
clock_gettime(CLOCK_REALTIME, &start);
^
main.c:54:19: error: use of undeclared identifier 'CLOCK_REALTIME'
clock_gettime(CLOCK_REALTIME, &end);
^
1 warning and 2 errors generated.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions