# OS_DisableFunctionCost

## Syntax

  `#include <nitro/os.h>`
  `BOOL OS_DisableFunctionCost( void );`

## Arguments

None.

## Return Values

The status before this function was called. TRUE indicates that it was enabled. FALSE indicates that it was disabled.

## Description

Disables function cost calculation.

This switch decides whether the function entry and exit (`__PROFILE_ENTRY`, `__PROFILE_EXIT`) that are inserted by the `profile` feature will become enabled. Therefore take note of how you time enable/disable switching. For example, if you call a function called `test()` when in disabled status, and then enable the feature from within the `test()` function, the data will be inconsistent because `__PROFILE_EXIT` will store the fact that `test()` was exited, even though nothing was stored at the function entry (`__PROFILE_ENTRY`).

Enable / disable switches are set for each cost calculation buffer. Therefore one will not disable all.

If this function is compiled for debugging, it will function properly. However, if compiled for the final ROM version (`FINALROM`) library, it will not do anything.

## See Also

`OS_InitFunctionCost, OS_EnableFunctionCost, OS_RestoreFunctionCost
`

## Revision History

2004/05/18 Initial version.

CONFIDENTIAL