SyntaxFix
Write A Post
Hire A Developer
Questions
One way to format it is:
printf("%lld.%.9ld", (long long)ts.tv_sec, ts.tv_nsec);