<PackageReference Include="NUnit" Version="4.1.0" />

TimeoutAttribute

Applies a timeout in milliseconds to a test. When applied to a method, the test is cancelled if the timeout is exceeded. When applied to a class or assembly, the default timeout is set for all contained test methods.
public TimeoutAttribute(int timeout)

Construct a TimeoutAttribute given a time in milliseconds