Esempio n. 1
0
        public static void BeginBlock(string name, uint color      = 0xffffecb3,
                                      ProfilerBlockStatus status   = ProfilerBlockStatus.ON,
                                      [CallerFilePath] string file = "",
                                      [CallerLineNumber] int line  = 0)
        {
            var profiler = AtomicNET.Context.GetProfiler();

            if (profiler != null)
            {
                csi_Atomic_Profiler_BeginBlock(profiler, name, file, line, color, (byte)status);
            }
        }
Esempio n. 2
0
        public static void Block(string name, Action block, uint color = 0xffffecb3,
                                 ProfilerBlockStatus status            = ProfilerBlockStatus.ON,
                                 [CallerFilePath] string file          = "",
                                 [CallerLineNumber] int line           = 0)
        {
#if ATOMIC_PROFILING
            var profiler = AtomicNET.Context.GetProfiler();
            if (profiler != null)
            {
                csi_Atomic_Profiler_BeginBlock(profiler, name, file, line, color, (byte)status);
            }
#endif
            block();
#if ATOMIC_PROFILING
            if (profiler != null)
            {
                csi_Atomic_Profiler_EndBlock(profiler);
            }
#endif
        }