EOS 合约使用 current_time_point (eosio.cdt v1.6)

From eosio.cdt v1.6 onwards
You have to #include <eosio/system.hpp> and then you can use:

eosio::current_time_point
eosio::current_block_time
to cast from time_point to uint32_t u can use like:
eosio::current_time_point().sec_since_epoch();

参考

https://github.com/EOSIO/eosio.cdt/issues/470

版权属于:Surou

本文链接:https://www.bcskill.com/index.php/archives/879.html

相关技术文章仅限于相关区块链底层技术研究,禁止用于非法用途,后果自负!本站严格遵守一切相关法律政策!

评论