Metadata-Version: 1.1
Name: pytictoc
Version: 1.4.0
Summary: Time code using syntax similar to tic and toc in MATLAB
Home-page: UNKNOWN
Author: Eric Fields
Author-email: Eric.Fields@tufts.edu
License: BSD (three-clause)
Description: pytictoc contains a class TicToc which replicates the functionality of MATLAB's tic and toc for easily timing sections of code. Under the hood, pytictoc uses the default_timer function from Python's timeit module.
        
        
        =============
        INSTALLATION
        =============
        
        pytictoc can be installed and updated via conda or pip.
        
        **pip**
        
        ::
        
         pip install pytictoc
         pip install pytictoc --upgrade
        
        **conda**
        
        ::
        
         conda install pytictoc -c ecf
         conda update pytictoc -c ecf
        
        
        ==========
        USAGE
        ==========
        
        ::
        
         >> from pytictoc import TicToc
        
         >> t = TicToc() #create instance of class
        
         >> t.tic() #Start timer
         >> t.toc() #Time elapsed since t.tic()
         Elapsed time is 2.612231 seconds.
        
         >> t.toc('It has been') #alternative message
         It has been 16.494467 seconds.
        
         >> t.toc(restart=True) #restart timer after reporting time
         Elapsed time is 36.986837 seconds.
         >>t.toc()
         Elapsed time is 2.393425 seconds.
        
         >>spam = t.tocvalue() #return elapsed time instead of printing
         >>spam
         20.156261717544602
         
         >>#Alternate timing method using a context manager:
         >>with TicToc():
         >>    spam = [x+1 for x in range(10000)]
         Elapsed time is 0.002343 seconds.
        
Keywords: timing
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Testing
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
