标签:result atime des tmp cti rect nbsp ctime 数据
uint64_t destime, oritime, rectime, tratime; int64_t result; result = ((rectime-oritime) + (tratime-destime))/2;
当((rectime-oritime) + (tratime-destime))是负数的时候,result不能得到正确的数,需要写成如下:
uint64_t destime, oritime, rectime, tratime; int64_t result, tmp; tmp = ((rectime-oritime) + (tratime-destime)); result = tmp/2;
STM32 ------ 处理 int64 类型数据需要注意
标签:result atime des tmp cti rect nbsp ctime 数据
原文地址:https://www.cnblogs.com/god-of-death/p/12809730.html