[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

# Re: [FEMM] How to get computation time with lua script

- To: Finite Element Method Magnetics mailing list <femm@list.foster-miller.net>
- Subject: Re: [FEMM] How to get computation time with lua script
- From: David Meeker <dmeeker@ieee.org>
- Date: Tue, 14 Oct 2003 16:09:19 -0400
- In-reply-to: <20031014192314.23815.qmail@web41105.mail.yahoo.com>
- List-archive: <http://femm.foster-miller.net/pipermail/femm>
- List-help: <mailto:femm-request@list.foster-miller.net?subject=help>
- List-id: Finite Element Method Magnetics mailing list <femm.list.foster-miller.net>
- List-post: <mailto:femm@list.foster-miller.net>
- List-subscribe: <http://femm.foster-miller.net/mailman/listinfo/femm>, <mailto:femm-request@list.foster-miller.net?subject=subscribe>
- List-unsubscribe: <http://femm.foster-miller.net/mailman/listinfo/femm>, <mailto:femm-request@list.foster-miller.net?subject=unsubscribe>
- References: <20031014192314.23815.qmail@web41105.mail.yahoo.com>
- Reply-to: Finite Element Method Magnetics mailing list <femm@list.foster-miller.net>
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624

`Tsarafidy RAMINOSOA wrote:`

> `Hello All,
> Could anyone tell me how to get the computation duration using lua script?
> Thanks in advance.
> Tsarafidy`

`
The clock() command returns an approximation of the amount of CPU time used by the program, in seconds. You could call clock at the beginning of the a script to get the starting time, call it again at the end to get the finish time, and take the difference to see how long it all took. An example that would measure how long an analysis takes to run in femm 3.3 would be:`

    t1=clock()
    analyze()
    t2=clock()
    print(t2-t1)

    Dave.
    --
    David Meeker
    email: dmeeker@ieee.org
    www: http://femm.berlios.de/dmeeker

- Follow-Ups:
  - Thanks --- Re: [FEMM] How to get computation time with lua script
    - From: Tsarafidy RAMINOSOA <tsarafidy@yahoo.fr>

- References:
  - [FEMM] How to get computation time with lua script
    - From: Tsarafidy RAMINOSOA <tsarafidy@yahoo.fr>

- Prev by Date: [FEMM] How to get computation time with lua script
- Next by Date: Re: [FEMM] How to get computation time with lua script
- Previous by thread: [FEMM] How to get computation time with lua script
- Next by thread: Thanks --- Re: [FEMM] How to get computation time with lua script
- Index(es):
  - Date
  - Thread