Revision caf7373f src/timestamped_list.cpp
src/timestamped_list.cpp | ||
---|---|---|
57 | 57 |
*target = tsf_list; |
58 | 58 |
} |
59 | 59 |
|
60 |
|
|
61 |
Timestamp TimestampedList::get_first_timestamp(){ |
|
62 |
//lock the tsf_list for this access. by doing this we assure |
|
63 |
//that no other thread accessing this element can diturb the |
|
64 |
//following atomic instructions: |
|
65 |
mutex::scoped_lock scoped_lock(access_mutex); |
|
66 |
|
|
67 |
if (tsf_list.empty()){ |
|
68 |
return Timestamp(0,0); |
|
69 |
} |
|
70 |
|
|
71 |
timestamped_float_list_t::iterator it = tsf_list.begin(); |
|
72 |
return it->timestamp; |
|
73 |
} |
|
74 |
|
|
60 | 75 |
Timestamp TimestampedList::get_last_timestamp(){ |
61 | 76 |
//lock the tsf_list for this access. by doing this we assure |
62 | 77 |
//that no other thread accessing this element can diturb the |
Also available in: Unified diff