JustQieTry
JustQieTry

Reputation: 511

Is there any equivalent function with clock_gettime in Mac OS X

I have tried clock_gettime in Mac OS, but gcc complains that can not find this symbol. I don't know why...... I just wanna use nanosecond to record performance.

Upvotes: 0

Views: 932

Answers (1)

Steven Schlansker
Steven Schlansker

Reputation: 38526

You can get microseconds from gettimeofday(2). Is that perhaps enough?

Upvotes: 1

Related Questions