mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-02-08 05:30:59 -05:00
- Added Sandbox.Test.Unit project (contains independent tests that can run in parallel) - Modify some slow/stress tests (e.g. instead of doing a million iterations settle for 10k). Tests run almost twice as fast now.
30 lines
632 B
Plaintext
30 lines
632 B
Plaintext
@namespace TestComponents
|
|
@using System.Diagnostics;
|
|
|
|
@for ( int i=0; i<10; i++)
|
|
{
|
|
<div style="hello">
|
|
@for ( int j=0; j< 10; j++)
|
|
{
|
|
@i <div style="hello" @onclick=@Stop>poop</div>
|
|
}</div>
|
|
}
|
|
|
|
<div class="bigtext" @onclick=@Stop>
|
|
<div class="title @(Seconds < 5 ? "is-fucked" : "is-relax")">The time is @Formatted</div>
|
|
<div class="icon"><i>time</i></div>
|
|
</div>
|
|
|
|
|
|
@code
|
|
{
|
|
public string Formatted => sw.Elapsed.ToString();
|
|
public float Seconds => (float)sw.Elapsed.TotalSeconds;
|
|
Stopwatch sw = Stopwatch.StartNew();
|
|
|
|
public void Stop()
|
|
{
|
|
sw.Stop();
|
|
}
|
|
}
|