How to get the timestamp when code is compiled?

Hi,

I am trying to get the timestamp when a code is compiled, and then use that as a macro to filter out certain events. Is there a way to do this?

I vaguely recall seeing some example code that used certain macro to display when code is compiled, but cannot locate them now.

Thanks,
ZL

Hi,

You can use macros below:

printf("\n[Build] %s %s\n", __DATE__, __TIME__);
1 Like