Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Timer function in VB.NET

0 views
Skip to first unread message

Jeff Peil

unread,
Aug 29, 2000, 3:00:00 AM8/29/00
to
VB.NET will support profiling eventually, it may even do so now (but the
docs aren't there yet, if so.) This is probably the best way to test code
performence. That said, if you are just trying to get the current time in
an efficient format, try System.DateTime.Now (DateTime's time format is
stored using the native WinNT time format, so this should have little
overhead, as compared to Vb6's Now function which returned a double.)

"Davie" <nospam_e...@hotmail.com> wrote in message
news:ONk2skYEAHA.82@cppssbbsa04...
> Hi All,
>
> Is there a Timer function in new VB.NET ?
> This is an error I get when compiling.
>
> error BC30451: The name 'Timer' is not declared.
>
> dStart = Timer()
> ~~~~~
>
> Should I reference some namespace to be able to call Timer function.
>
> Is there a better way to test code performance in VB.NET other than
> Timer ? Like ASP.NET trace functionality ?
>
> Thanks, Davie.
>
>

Jeff Peil

unread,
Aug 29, 2000, 3:00:00 AM8/29/00
to
I guess I spoke a bit too soon, it looks like profiling is documented
(somewhat), check out the CorProf.IDL in %NGWSSDK%\Include

"Jeff Peil" <jp...@bigfoot.com> wrote in message
news:eyAT4BiEAHA.294@cppssbbsa04...

Eduardo A. Morcillo

unread,
Aug 30, 2000, 3:00:00 AM8/30/00
to
Timer (which encapsulate calls to System.DateTime) is in the
Microsoft.VisualBasic namespace.

--
Eduardo A. Morcillo
http://www.domaindlx.com/e_morcillo


"Jeff Peil" <jp...@bigfoot.com> wrote in message

news:eINunmjEAHA.195@cppssbbsa04...

Brian (MS)

unread,
Aug 30, 2000, 3:00:00 AM8/30/00
to
Sure, in System.Timers.Timer. You need to reference System.Timers.dll to
use it.

-Brian

--------------------
Reply-To: "Davie" <nospam_e...@hotmail.com>
From: "Davie" <nospam_e...@hotmail.com>
Subject: Timer function in VB.NET
Date: Tue, 29 Aug 2000 00:20:27 -0700
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Message-ID: <ONk2skYEAHA.82@cppssbbsa04>
Newsgroups: microsoft.public.dotnet.vb.general
NNTP-Posting-Host: dialup-209.247.139.137.SanJose1.Level3.net
209.247.139.137
Path: cppssbbsa01.microsoft.com!cppssbbsa04
Xref: cppssbbsa01.microsoft.com microsoft.public.dotnet.vb.general:16
X-Tomcat-NG: microsoft.public.dotnet.vb.general

Jeff Peil

unread,
Aug 30, 2000, 3:00:00 AM8/30/00
to
Yeah, but he asked if there was a better way to test code performence, I
would agrue that profiling is a better way.


"Eduardo A. Morcillo" <e_morcillo.dontwantspam.@yahoo.com> wrote in message
news:#UPVJhmEAHA.253@cppssbbsa05...


> Timer (which encapsulate calls to System.DateTime) is in the
> Microsoft.VisualBasic namespace.
>
> --
> Eduardo A. Morcillo
> http://www.domaindlx.com/e_morcillo
> "Jeff Peil" <jp...@bigfoot.com> wrote in message
> news:eINunmjEAHA.195@cppssbbsa04...
> > I guess I spoke a bit too soon, it looks like profiling is documented
> > (somewhat), check out the CorProf.IDL in %NGWSSDK%\Include
> >
> > "Jeff Peil" <jp...@bigfoot.com> wrote in message
> > news:eyAT4BiEAHA.294@cppssbbsa04...
> > > VB.NET will support profiling eventually, it may even do so now (but
the
> > > docs aren't there yet, if so.) This is probably the best way to test
> code
> > > performence. That said, if you are just trying to get the current
time
> in
> > > an efficient format, try System.DateTime.Now (DateTime's time format
is
> > > stored using the native WinNT time format, so this should have little
> > > overhead, as compared to Vb6's Now function which returned a double.)
> > >
> > > "Davie" <nospam_e...@hotmail.com> wrote in message
> > > news:ONk2skYEAHA.82@cppssbbsa04...

0 new messages