Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92215

Re: Function to show time to execute another function

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail
From Luca Menegotto <otlucaDELETE@DELETEyahoo.it>
Newsgroups comp.lang.python
Subject Re: Function to show time to execute another function
Date Sun, 07 Jun 2015 11:06:10 +0200
Organization Aioe.org NNTP Server
Lines 27
Message-ID <ml11i1$31j$1@speranza.aioe.org> (permalink)
References <87k2vgowco.fsf@Equus.decebal.nl> <mailman.231.1433662792.13271.python-list@python.org> <87fv64orly.fsf@Equus.decebal.nl>
NNTP-Posting-Host cWbc60ZH/xwZfaSD9C2Qag.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
X-Notice Filtered by postfilter v. 0.8.2
Xref csiph.com comp.lang.python:92215

Show key headers only | View raw


Il 07/06/2015 10:22, Cecil Westerhof ha scritto:
 > That only times the function. I explicitly mentioned I want both the
 > needed time AND the output.
 >
 > Sadly the quality of the answers on this list is going down....

First of all, thank God it's a newsgroup, not a list.

Second, often the quality of an answer is deeply connected to the 
quality of a question. I've red your question, and I still have not 
clear what you want.

If you want a function that returns a result and a time elapsed, why 
don't you pack the time and the result in a tuple, a list or a 
dictionary? it takes 20 seconds, if you are slow.

Else if you want a function that prints time and result, why don't you 
print result more or less in the same manner you do with the time 
elapsed? it takes 20 seconds, if you are slow.

Else, can you explain exactly what do you want?


-- 
Ciao!
Luca

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Function to show time to execute another function Cecil Westerhof <Cecil@decebal.nl> - 2015-06-07 08:39 +0200
  Re: Function to show time to execute another function Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-07 08:39 +0100
    Re: Function to show time to execute another function Cecil Westerhof <Cecil@decebal.nl> - 2015-06-07 10:22 +0200
      Re: Function to show time to execute another function Luca Menegotto <otlucaDELETE@DELETEyahoo.it> - 2015-06-07 11:06 +0200
        Is it a newsgroup or a list? random832@fastmail.us - 2015-06-07 07:20 -0400
          Re: Is it a newsgroup or a list? Steven D'Aprano <steve@pearwood.info> - 2015-06-07 21:45 +1000
            Re: Is it a newsgroup or a list? Chris Warrick <kwpolska@gmail.com> - 2015-06-07 15:10 +0200
            Re: Is it a newsgroup or a list? Luca Menegotto <otlucaDELETE@DELETEyahoo.it> - 2015-06-07 16:12 +0200
        Re: Function to show time to execute another function Cecil Westerhof <Cecil@decebal.nl> - 2015-06-07 13:53 +0200
        Re: Is it a newsgroup or a list? Tim Golden <mail@timgolden.me.uk> - 2015-06-07 14:57 +0100
      Re: Function to show time to execute another function Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-07 11:16 +0100
        [OT] Re: Function to show time to execute another function Marko Rauhamaa <marko@pacujo.net> - 2015-06-07 14:02 +0300
          Re: [OT] Re: Function to show time to execute another function Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-07 12:12 +0100
        Re: Function to show time to execute another function Steven D'Aprano <steve@pearwood.info> - 2015-06-07 21:29 +1000
        Re: Function to show time to execute another function Cecil Westerhof <Cecil@decebal.nl> - 2015-06-07 14:03 +0200
      Re: Function to show time to execute another function Tim Golden <mail@timgolden.me.uk> - 2015-06-07 12:05 +0100
        Re: Function to show time to execute another function Cecil Westerhof <Cecil@decebal.nl> - 2015-06-07 14:43 +0200
      Re: Function to show time to execute another function Laura Creighton <lac@openend.se> - 2015-06-07 15:03 +0200
      Re: Function to show time to execute another function Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-06-07 20:51 +0200
        Re: Function to show time to execute another function Cecil Westerhof <Cecil@decebal.nl> - 2015-06-07 22:35 +0200
          Re: Function to show time to execute another function Johannes Bauer <dfnsonfsduifb@gmx.de> - 2015-06-08 07:04 +0200
            Re: Function to show time to execute another function Cecil Westerhof <Cecil@decebal.nl> - 2015-06-08 08:32 +0200
  Re: Function to show time to execute another function Steven D'Aprano <steve@pearwood.info> - 2015-06-07 19:28 +1000
    Re: Function to show time to execute another function Luca Menegotto <otlucaDELETE@DELETEyahoo.it> - 2015-06-07 11:44 +0200
    Re: Function to show time to execute another function Cecil Westerhof <Cecil@decebal.nl> - 2015-06-07 14:14 +0200
    Re: Function to show time to execute another function Cecil Westerhof <Cecil@decebal.nl> - 2015-06-07 14:58 +0200
  Re: Function to show time to execute another function Steven D'Aprano <steve@pearwood.info> - 2015-06-07 19:51 +1000
    Re: Function to show time to execute another function Cecil Westerhof <Cecil@decebal.nl> - 2015-06-07 14:27 +0200
  Re: Function to show time to execute another function Cecil Westerhof <Cecil@decebal.nl> - 2015-06-07 11:31 +0200
  Re: Is it a newsgroup or a list? Gene Heskett <gheskett@wdtv.com> - 2015-06-07 11:49 -0400
  Re: Is it a newsgroup or a list? Larry Martell <larry.martell@gmail.com> - 2015-06-07 11:56 -0400

csiph-web