Home
last modified time | relevance | path

Searched refs:ONE_KB (Results 1 – 2 of 2) sorted by relevance

/base/update/update_app/common/src/main/ets/util/
DFormatUtils.ts41 const ONE_KB = 1024; constant
45 let index = Math.floor(Math.log(data) / Math.log(ONE_KB));
46 return parseFloat((bytes / Math.pow(ONE_KB, index)).toFixed(point)) + ' ' + sizes[index];
/base/hiviewdfx/hilog/frameworks/libhilog/utils/
Dlog_utils.cpp32 constexpr uint32_t ONE_KB = (1UL << 10); variable
52 {'B', 1}, {'K', ONE_KB}, {'M', ONE_MB},
61 case 0 ... ONE_KB - 1: unit = 1; break; in Size2Str()
62 case ONE_KB ... ONE_MB - 1: unit = ONE_KB; break; in Size2Str()