Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
2c9d4b4d
Commit
2c9d4b4d
authored
Jan 03, 2017
by
Michael Ott
Browse files
Fix check for outdated cache entries in SensorCache::getAverage()
parent
c9634880
Changes
1
Hide whitespace changes
Inline
Side-by-side
CollectAgent/sensorcache.cpp
View file @
2c9d4b4d
...
...
@@ -67,8 +67,7 @@ int64_t SensorCache::getAverage(cacheEntry_t &entry, uint64_t avg) {
TimeStamp
ts
;
if
(
entry
.
size
()
>
0
)
{
//std::cout << ts.getRaw() - entry.back().timestamp << std::endl;
if
(
ts
.
getRaw
()
-
entry
.
back
().
timestamp
>
avg
*
NS_PER_S
)
{
if
(
ts
.
getRaw
()
-
entry
.
front
().
timestamp
<
avg
*
NS_PER_S
)
{
throw
std
::
out_of_range
(
"Sid outdated"
);
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment