]> git.saurik.com Git - apple/system_cmds.git/blobdiff - latency.tproj/latency.c
system_cmds-279.6.1.tar.gz
[apple/system_cmds.git] / latency.tproj / latency.c
index f9bb800af1213050585c3f75c46d7c13650c6c76..42a91552f110813802862db5b80c341b0f1b4d49 100644 (file)
@@ -433,6 +433,7 @@ void sigintr()
         set_enable(0);
        set_pidexclude(getpid(), 0);
         screen_update(log_fp);
+       endwin();
        set_rtcdec(0);
        set_remove();
        
@@ -443,6 +444,7 @@ void leave()    /* exit under normal conditions -- signal handler */
 {
         set_enable(0);
        set_pidexclude(getpid(), 0);
+       endwin();
        set_rtcdec(0);
        set_remove();
        
@@ -1252,8 +1254,7 @@ void sample_sc(uint64_t start, uint64_t stop)
                if (type == DECR_TRAP)
                        i_latency = handle_decrementer(kd);
 
-               now = (((uint64_t)kd->timestamp.tv_sec) << 32) |
-                       (uint64_t)((unsigned int)(kd->timestamp.tv_nsec));
+               now = kd->timestamp;
 
                timestamp = ((double)now) / divisor;
 
@@ -1780,8 +1781,7 @@ kd_buf *log_decrementer(kd_buf *kd_beg, kd_buf *kd_end, kd_buf *end_of_sample, d
        if (kd_stop >= end_of_sample)
                kd_stop = end_of_sample - 1;
 
-       now = (((uint64_t)kd_start->timestamp.tv_sec) << 32) |
-               (uint64_t)((unsigned int)(kd_start->timestamp.tv_nsec));
+       now = kd_start->timestamp;
        timestamp = ((double)now) / divisor;
 
        for (kd = kd_start; kd <= kd_stop; kd++) {
@@ -1800,8 +1800,7 @@ kd_buf *log_decrementer(kd_buf *kd_beg, kd_buf *kd_end, kd_buf *end_of_sample, d
                debugid = kd->debugid;
                type    = kd->debugid & DBG_FUNC_MASK;
 
-               now = (((uint64_t)kd->timestamp.tv_sec) << 32) |
-                       (uint64_t)((unsigned int)(kd->timestamp.tv_nsec));
+               now = kd->timestamp;
 
                timestamp = ((double)now) / divisor;