[VER] v0.3.9-alpha
[Feat] is 操作符现在可以直接判断内置数据类型, 如 10 is Int [Fix] evalMemberExpr的lhs可以为右值,修复原来限制为左值的BUG,如调用一个函数返回结果为struct且访问member触发此bug [Impl] 可更换的std::dynamic_pointer_cast更换为static版本,更快! [Feat] 增加标准库 std.time,以及用到的builtin: __ftime_now_ns,但目前 Time类有点BUG [...] 剩下的忘了
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include <cstdint>
|
||||
#include <string_view>
|
||||
|
||||
#define __FCORE_VERSION "0.3.8-alpha"
|
||||
#define __FCORE_VERSION "0.3.9-alpha"
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define __FCORE_PLATFORM "Windows"
|
||||
|
||||
18
src/Core/runtimeTime.cpp
Normal file
18
src/Core/runtimeTime.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <Core/runtimeTime.hpp>
|
||||
|
||||
#include <cassert>
|
||||
|
||||
namespace Fig::Time
|
||||
{
|
||||
Clock::time_point start_time;
|
||||
void init()
|
||||
{
|
||||
static bool flag = false;
|
||||
if (flag)
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
start_time = Clock::now();
|
||||
flag = true;
|
||||
}
|
||||
};
|
||||
10
src/Core/runtimeTime.hpp
Normal file
10
src/Core/runtimeTime.hpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <chrono>
|
||||
|
||||
namespace Fig::Time
|
||||
{
|
||||
using Clock = std::chrono::steady_clock;
|
||||
extern Clock::time_point start_time; // since process start
|
||||
void init();
|
||||
};
|
||||
Reference in New Issue
Block a user