1

有没有办法打印每次登录独木舟的日期和时间???示例:现在对我来说它的打印如下

"8754.876831   CAN 1   AAA   YYYY   CAN Frame    Tx     8     8             00 00 00 00 00 00 00 00"

我想在下面

"09 OCT 2017 14:17:23.853 CAN 1   AAA   YYYY   CAN Frame    Tx     8     8             00 00 00 00 00 00 00 00"

有没有办法像上面一样在独木舟上打印???

4

1 回答 1

2

尝试这个:

on key 'l'
{
  long tm[9];

  getLocalTime(tm);

  write("seconds:%d minutes:%d hours:%d day:%d month:%d year:%d",tm[0],tm[1],tm[2],tm[3],tm[4]+1,tm[5]+1900);
}
于 2017-10-16T14:49:00.727 回答