Skip to content

time.h on mac #5

@xor256

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions