Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/304#discussion_r51749694
  
    --- Diff: core/sqf/src/tm/idtmsrv.cpp ---
    @@ -53,6 +56,37 @@ void do_reply(BMS_SRE *pp_sre, char *pp_reply, int 
pv_len, short pv_ec);
     
     
     //
    +// Reset the global time counter
    +//
    +void reset_time_counter() {
    +
    +    struct timespec lv_new_ts;
    +
    +    clock_gettime(CLOCK_REALTIME, &lv_new_ts);
    +    unsigned long lv_new_tsl = ((unsigned long) lv_new_ts.tv_sec << 20) |
    +                               ((unsigned long) lv_new_ts.tv_nsec / 1000);
    +
    +    unsigned long lv_existing_tsl = __sync_add_and_fetch_8(gp_shm, 0);
    +    __sync_add_and_fetch_8(gp_shm, lv_new_tsl - lv_existing_tsl);
    --- End diff --
    
    Can time go backwards here? And would that cause a problem?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to