diff options
Diffstat (limited to 'core/src')
| -rw-r--r-- | core/src/xmake/hash/rand128.c | 4 | ||||
| -rw-r--r-- | core/src/xmake/hash/rand32.c | 2 | ||||
| -rw-r--r-- | core/src/xmake/hash/rand64.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/core/src/xmake/hash/rand128.c b/core/src/xmake/hash/rand128.c index 946d396fd..1e1f34fde 100644 --- a/core/src/xmake/hash/rand128.c +++ b/core/src/xmake/hash/rand128.c @@ -41,8 +41,8 @@ tb_int_t xm_hash_rand128(lua_State* lua) static union { tb_byte_t b[16]; tb_uint64_t word[2]; } s_seed = {0}; if (!s_seed.word[0] && !s_seed.word[1]) { - s_seed.word[0] = (tb_uint64_t)tb_mclock(); - s_seed.word[1] = (tb_uint64_t)tb_mclock(); + s_seed.word[0] = (tb_uint64_t)tb_uclock(); + s_seed.word[1] = (tb_uint64_t)tb_uclock(); } s_seed.word[0] = xm_hash_xorshift128(s_seed.word); s_seed.word[1] = xm_hash_xorshift128(s_seed.word); diff --git a/core/src/xmake/hash/rand32.c b/core/src/xmake/hash/rand32.c index b76b0ae15..66885a2cd 100644 --- a/core/src/xmake/hash/rand32.c +++ b/core/src/xmake/hash/rand32.c @@ -40,7 +40,7 @@ tb_int_t xm_hash_rand32(lua_State* lua) static union { tb_byte_t b[4]; tb_uint32_t word; } s_seed = {0}; if (!s_seed.word) - s_seed.word = (tb_uint32_t)tb_mclock(); + s_seed.word = (tb_uint32_t)tb_uclock(); s_seed.word = xm_hash_xorshift32(s_seed.word); tb_char_t s[64]; diff --git a/core/src/xmake/hash/rand64.c b/core/src/xmake/hash/rand64.c index a42d0eedb..31732bc53 100644 --- a/core/src/xmake/hash/rand64.c +++ b/core/src/xmake/hash/rand64.c @@ -40,7 +40,7 @@ tb_int_t xm_hash_rand64(lua_State* lua) static union { tb_byte_t b[8]; tb_uint64_t word; } s_seed = {0}; if (!s_seed.word) - s_seed.word = (tb_uint64_t)tb_mclock(); + s_seed.word = (tb_uint64_t)tb_uclock(); s_seed.word = xm_hash_xorshift64(s_seed.word); tb_char_t s[256]; |
