Start() public method

public Start ( ) : void
return void
示例#1
0
        public async Task InvokeAsync(HttpContext context)
        {
            using (var time = TimeLogger.Start())
            {
                context.Response.OnStarting(state =>
                {
                    var httpContext = (HttpContext)state;
                    httpContext.Response.Headers.Add("Time", time.FormatedTime);
                    return(Task.CompletedTask);
                }, context);

                await _next(context);
            }
        }
示例#2
0
        public override void UpdateComponent()
        {
            float[,] heightmap = base.GetTerrainHeight();
            int resolution = base.meshGenerator.resolution;

            if (useGPU)
            {
                diamondSquare = new DiamondSquareGPU(resolution, shader);
            }
            else
            {
                diamondSquare = new DiamondSquare(resolution);
            }

            TimeLogger.Start(diamondSquare.GetType().Name, diamondSquare.Resolution);

            diamondSquare.Apply(heightmap);

            TimeLogger.RecordSingleTimeInMilliseconds();

            base.UpdateTerrainHeight(heightmap);
        }