View Raw SPL
/****************************************************************************
*                                                                           *
*   STRTOC.SPL   Copyright 2024 (C) DSP Development Corporation             *
*                                                                           *
*   Author:      Randy Race                                                 *
*                                                                           *
*   Synopsis:    converts TOC to a string                                   *
*                                                                           *
*   Revisions:    1 Nov 2024     RRR     Creation                           *
*                                                                           *
****************************************************************************/


#if @HELP_STRTOC

    STRTOC

    Purpose: Converts the value of elapsed tic/toc seconds to a string.

    Syntax:  STRTOC()

    Returns: A string, the value of the TOC counter as a string.

    Example:
             W1: gnorm(1024 * 512, 1)
             W2: tic;fft(w1);label(strtoc());

             W2 is labeled with the approximate time to calculate the FFT
             of W1.
            
    Remarks:
             STRTOC converts the elapsed time since the last TIC command
             with a precision of approximately 0.00001 seconds, i.e.
             10 microseconds. The interval timer is not reset.

             See TOCLABEL to automatically label a window with the elapsed
             TIC/TOC time interval.

    See Also:
             CLOCK
             GETTIME
             TIC
             TOC
             TOCLABEL
#endif


/* toc as a string */
strtoc()
{
        return(strnum(toc));
}