Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Media Player - CPU Usage

by Lotus1 (Deacon)
on Nov 28, 2012 at 22:03 UTC ( #1006113=note: print w/ replies, xml ) Need Help??

in reply to Media Player - CPU Usage

Here is what is shown for this in the synopsis for Win32::MediaPlayer.

while(1) { sleep 1; print 'Now Position: '.$winmm->pos(1)."\r"; # Show now tim +e. };

To break out of the while loop you could do this:

       last unless $winmm->pos < $winmm->length;

Update: In order to get the print statement inside the while loop to work I had to add $| = 1; at the top of the program.

Comment on Re: Media Player - CPU Usage
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1006113]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2015-11-27 22:38 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (734 votes), past polls