Forum Discussion
Altera_Forum
Honored Contributor
16 years agothe use of static, get wrong result
Who can tell me why I get the wrong result? function: alt_u64 tpm_get_ticks(void) { static alt_u64 old_t=0 ; alt_u64 new_t=0; alt_u64 res_t=0; new_t = ...
Altera_Forum
Honored Contributor
16 years agoYou need %llx to match a 64bit value on the Nios (and most 32bit systems).
For portability use int64_t and PRId64 from inttypes.h.