473,382 Members | 1,247 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

taming the cursor

Hello,
I have a text application in C that works well on
quick machines. On old PCs, I have to press and
release the arrow keys slowly. If I push and keep
an arrow key down, the cursor goes wild and lands
somewhere without any understandable pattern.

I need an idea - or some code - for the following:

after executing a command, discard the same
command if it comes within x milliseconds.
Thanks.
Joe

Nov 15 '05 #1
2 1036
jo*******@lycos.com wrote:
I have a text application in C that works well on
quick machines. On old PCs, I have to press and
release the arrow keys slowly. If I push and keep
an arrow key down, the cursor goes wild and lands
somewhere without any understandable pattern.
This is platform specific and thus off-topic.
I need an idea - or some code - for the following:

after executing a command, discard the same
command if it comes within x milliseconds.


Well, on some systems you can detect the events key-press and
key-release independently. Triggering on release would be a
simple workaround.

Anyway, the only way to measure time with a resolution below
one second is clock().
Nov 15 '05 #2
Alexander Bartolich <al*****************@gmx.at> writes:
[...]
Anyway, the only way to measure time with a resolution below
one second is clock().


Um, not really. clock() measures CPU time, not real time. The
resolution of the time() function is commonly 1 second, but the
standard doesn't guarantee this.

Practically speaking, the only way to measure time with a resolution
below one second is to use some system-specific extension.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: lists(nospam)at | last post by:
Howdy all, After following a tutorial on ALA (taming lists) I converted my navigation box from a table to a list. Generally very happy with it with the exception of IE6 on the Win platform...
2
by: dave | last post by:
In my form Ive got a SaveData() routine that saves changes to a DB. When I encounter an exception in the save operations, I am having trouble chaning the cursor back to the default cursor, it just...
5
by: Lespaul36 | last post by:
I have a mdi app. I need to change the cursor when I click on certain button on a form that I made into a toolbar. I tried to use cursor.current. But the cursor won't show. if I change the form...
10
by: Just Me | last post by:
Does Me.Cursor.Current=Cursors.WaitCursor set the current property of Me.Cursor to Cursors.WaitCursor And Me.Cursor.Current=Cursors.Default set the Me.Current property to something (default)...
2
by: Alex | last post by:
In the code below, clicking on the button ButtonChangeCursor changes the form's cursor to a WaitCursor. Clicking the button ButtonRestoreCursor changes the form's cursor back to its original...
2
by: Jim Frazer | last post by:
Hi, I'm working on an application in C# that will allow the user to create simple CAD drawings on a CEPC system. I would like to be able to change the cursor shape depending on the drawing mode...
7
by: Academic | last post by:
What are the different effects of the following two statements: C1.Cursor = Cursors.WaitCursor C1.Cursor.Current = Cursors.WaitCursor I believe the first replaces the entire C1.Cursor...
0
debasisdas
by: debasisdas | last post by:
RESTRICTIONS ON CURSOR VARIABLES ================================= Currently, cursor variables are subject to the following restrictions: Cannot declare cursor variables in a package spec. ...
4
by: mike | last post by:
I have the opportunity to rescue a project that uses a mouse to sense the relative position of a machine. The hardware is built...just needs to be programmed. Stop snickering!!! I didn't do it...I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.