mirror of
https://github.com/dlang/phobos.git
synced 2025-05-12 07:08:48 +03:00
Fixed: dmd die of the generation of the document.
This commit is contained in:
parent
08af0f5500
commit
cf4ff42933
1 changed files with 16 additions and 16 deletions
|
@ -841,24 +841,24 @@ unittest
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
@safe
|
||||||
|
{
|
||||||
|
/***************************************************************************
|
||||||
* Scope base measuring time.
|
* Scope base measuring time.
|
||||||
*
|
*
|
||||||
* When a value that is returned by this function is destroyed, FN will run.
|
* When a value that is returned by this function is destroyed, FN will run.
|
||||||
* FN is unaly function that requires Ticks.
|
* FN is unaly function that requires Ticks.
|
||||||
*
|
*
|
||||||
* Excample:
|
* Excample:
|
||||||
*------------------------------------------------------------------------------
|
*--------------------------------------------------------------------------
|
||||||
*writeln("benchmark start!");
|
*writeln("benchmark start!");
|
||||||
*{
|
*{
|
||||||
* auto mt = measureTime!((a){assert(a.seconds);});
|
* auto mt = measureTime!((a){assert(a.seconds);});
|
||||||
* doSomething();
|
* doSomething();
|
||||||
*}
|
*}
|
||||||
*writeln("benchmark end!");
|
*writeln("benchmark end!");
|
||||||
*------------------------------------------------------------------------------
|
*--------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@safe
|
|
||||||
{
|
|
||||||
auto measureTime(alias func)()
|
auto measureTime(alias func)()
|
||||||
if (isSafe!func)
|
if (isSafe!func)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue