Ignore:
Timestamp:
Jan 18, 2006 11:32:27 PM (18 years ago)
Author:
bennylp
Message:

Fixed minor warnings/mismatched comments mainly in pjlib++

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj++/os.hpp

    r65 r122  
    2121 
    2222#include <pj/os.h> 
     23#include <pj/string.h> 
    2324#include <pj++/types.hpp> 
    2425#include <pj++/pool.hpp> 
     
    152153        destroy(); 
    153154        return Pj_Thread_API::create( pool, &thread_, &thread_proc, this, 
    154                                       flags, thread_name); 
     155                                      flags, thread_name, stack_size); 
    155156    } 
    156157 
     
    532533    : sem_(NULL) 
    533534    { 
     535        create(pool, max, initial, name); 
    534536    } 
    535537 
     
    723725 
    724726// 
     727// Timestamp 
     728// 
     729class Pj_Timestamp 
     730{ 
     731public: 
     732    pj_status_t get_timestamp() 
     733    { 
     734        return pj_get_timestamp(&ts_); 
     735    } 
     736 
     737    Pj_Timestamp& operator += (const Pj_Timestamp &rhs) 
     738    { 
     739        pj_add_timestamp(&ts_, &rhs.ts_); 
     740        return *this; 
     741    } 
     742 
     743    Pj_Timestamp& operator -= (const Pj_Timestamp &rhs) 
     744    { 
     745        pj_sub_timestamp(&ts_, &rhs.ts_); 
     746        return *this; 
     747    } 
     748 
     749    Pj_Time_Val to_time() const 
     750    { 
     751        Pj_Timestamp zero; 
     752        pj_memset(&zero, 0, sizeof(zero)); 
     753        return Pj_Time_Val(pj_elapsed_time(&zero.ts_, &ts_)); 
     754    } 
     755 
     756    pj_uint32_t to_msec() const 
     757    { 
     758        Pj_Timestamp zero; 
     759        pj_memset(&zero, 0, sizeof(zero)); 
     760        return pj_elapsed_msec(&zero.ts_, &ts_); 
     761    } 
     762 
     763    pj_uint32_t to_usec() const 
     764    { 
     765        Pj_Timestamp zero; 
     766        pj_memset(&zero, 0, sizeof(zero)); 
     767        return pj_elapsed_usec(&zero.ts_, &ts_); 
     768    } 
     769 
     770    pj_uint32_t to_nanosec() const 
     771    { 
     772        Pj_Timestamp zero; 
     773        pj_memset(&zero, 0, sizeof(zero)); 
     774        return pj_elapsed_nanosec(&zero.ts_, &ts_); 
     775    } 
     776 
     777    pj_uint32_t to_cycle() const 
     778    { 
     779        Pj_Timestamp zero; 
     780        pj_memset(&zero, 0, sizeof(zero)); 
     781        return pj_elapsed_cycle(&zero.ts_, &ts_); 
     782    } 
     783 
     784private: 
     785    pj_timestamp    ts_; 
     786}; 
     787 
     788 
     789// 
    725790// OS abstraction. 
    726791// 
Note: See TracChangeset for help on using the changeset viewer.