[Power] Fix variable type to avoid invalidation 42/317942/2 accepted/tizen/unified/20240924.153222 accepted/tizen/unified/toolchain/20241004.101306 accepted/tizen/unified/x/20240925.015909 accepted/tizen/unified/x/asan/20241013.235602
authorYunhee Seo <yuni.seo@samsung.com>
Mon, 23 Sep 2024 02:25:21 +0000 (11:25 +0900)
committerPiotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics <p.kosko@samsung.com>
Mon, 23 Sep 2024 08:24:42 +0000 (10:24 +0200)
commit10ec12c2dfa91693abc49e2a29284c06b010f1d1
tree2fc6de6203459e1238135675729b2afa79f4fec5
parent8fe6059556fe75360f7d17f422baf48c3b05e855
[Power] Fix variable type to avoid invalidation

[Bug] Double can be represented with some inaccuracy e.g. 30.0 can be
   29.999999 which in case of casting to int is casted to 29 instead of 30
   as expected.

[Solution] Added std round to proper round double value to closest
inteager instead of cutting of the decimal part of number.

Change-Id: I20e889df9d6a0ff4434fc18b77016287f0bd45c7
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/power/power_manager.cc