Re: Winforms, Shown Event and SetEnvironmentVariable
- From: "Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Sat, 16 Feb 2008 16:49:17 -0800
On Sat, 16 Feb 2008 13:42:49 -0800, Willy Denoyette [MVP] <willy.denoyette@xxxxxxxxxx> wrote:
Yep, these two:
Environment.SetEnvironmentVariable("someKey", "1", EnvironmentVariableTarget.User);
Environment.SetEnvironmentVariable("someOtherKey", "2", EnvironmentVariableTarget.User);
in Shown handler.
Running V2 SP1 of the FW on VISTA.
Timing done using "QueryThreadCycleTime" API (Vista and up), with Processor clock at fixed rate.
Why are you doing that? The question here is elapsed time, not the CPU time consumed by the thread for the calls.
If you just put a Stopwatch in the Shown event handler, start it before the two calls, and check the Elapsed time after them, what results do you get?
Not that it's relevant to this question IMHO, but what's the .NET API for the QueryThreadCycleTime call (if any)? I can only find the unmanaged version. Is there a managed way to get at that? Maybe in WMI?
Pete
.
- Follow-Ups:
- Re: Winforms, Shown Event and SetEnvironmentVariable
- From: Willy Denoyette [MVP]
- Re: Winforms, Shown Event and SetEnvironmentVariable
- References:
- Winforms, Shown Event and SetEnvironmentVariable
- From: Dilip
- Re: Winforms, Shown Event and SetEnvironmentVariable
- From: Peter Duniho
- Re: Winforms, Shown Event and SetEnvironmentVariable
- From: Dilip
- Re: Winforms, Shown Event and SetEnvironmentVariable
- From: Willy Denoyette [MVP]
- Re: Winforms, Shown Event and SetEnvironmentVariable
- From: Peter Duniho
- Re: Winforms, Shown Event and SetEnvironmentVariable
- From: Willy Denoyette [MVP]
- Winforms, Shown Event and SetEnvironmentVariable
- Prev by Date: SV: SV: SV: SV: What's the size of the window
- Next by Date: Re: SV: Text not writen in the console when (re)painting the window
- Previous by thread: Re: Winforms, Shown Event and SetEnvironmentVariable
- Next by thread: Re: Winforms, Shown Event and SetEnvironmentVariable
- Index(es):
Relevant Pages
|