473,396 Members | 1,843 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,396 software developers and data experts.

RealTime System + Windows XP + C# or C

Hi. Timer in C# not work, Thread + Loop + Sleep + DateTime.Now too not work
(Process.Prioritet = RealTime)
What i do wrong?
Best regards.

Rafal
Nov 14 '05 #1
10 2514
Rafa³ <ma****@poczta.onet.pl> scribbled the following:
Hi. Timer in C# not work, Thread + Loop + Sleep + DateTime.Now too not work
(Process.Prioritet = RealTime)
What i do wrong?
Best regards.


What you are doing wrong is using a completely different language than
C. Despite the name, C# has nothing to do with C.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"Shh! The maestro is decomposing!"
- Gary Larson
Nov 14 '05 #2
Joona I Palaste wrote:
Rafa³ <ma****@poczta.onet.pl> scribbled the following:
Hi. Timer in C# not work, Thread + Loop + Sleep + DateTime.Now too not work
(Process.Prioritet = RealTime)
What i do wrong?
Best regards.

What you are doing wrong is using a completely different language than
C. Despite the name, C# has nothing to do with C.

Thanks
Nov 14 '05 #3
Joona I Palaste wrote:
Rafa³ <ma****@poczta.onet.pl> scribbled the following:
Hi. Timer in C# not work, Thread + Loop + Sleep + DateTime.Now too not work
(Process.Prioritet = RealTime)
What i do wrong?
Best regards.

What you are doing wrong is using a completely different language than
C. Despite the name, C# has nothing to do with C.

What about C# application + C dll?
Nov 14 '05 #4
Rafał wrote:
Hi. Timer in C# not work,
Is anyone surprised that C# doesn't work.
Thread + Loop + Sleep + DateTime.Now too not work
(Process.Prioritet = RealTime)
What i do wrong?


1) Using C#
2) posting questions to comp.lang.c (where the C programming language is
discussed) about C#, a proprietary product of the evil empire,
purporting to be *some* programming language, but certainly not C.
Nov 14 '05 #5
Martin Ambuhl wrote:
Rafał wrote:
Hi. Timer in C# not work,

Is anyone surprised that C# doesn't work.
Thread + Loop + Sleep + DateTime.Now too not work
(Process.Prioritet = RealTime)
What i do wrong?

1) Using C#
2) posting questions to comp.lang.c (where the C programming language is
discussed) about C#, a proprietary product of the evil empire,
purporting to be *some* programming language, but certainly not C.

ok, but i write in C too, when i use timer with C (SetTimer), when i
minimalize or maximalize other appliacation, my application (Mangement C
+ RealTime Priority):

time CLK I get in real
0,2s 0 0,23s etc
0,4s 1 0,5 etc
0,6s 0
0,8s 1
Nov 14 '05 #6
Rafa? wrote:
Joona I Palaste wrote:
Rafa³ <ma****@poczta.onet.pl> scribbled the following:
Hi. Timer in C# not work, Thread + Loop + Sleep + DateTime.Now
too not work (Process.Prioritet = RealTime)
What i do wrong?


What you are doing wrong is using a completely different language
than C. Despite the name, C# has nothing to do with C.

What about C# application + C dll?


Dlls have nothing to do with C as discussed in c.l.c. Read the
'welcome' message that is posted here periodically.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
Nov 14 '05 #7
Rafa³ <ma****@poczta.onet.pl> writes:
[...]
ok, but i write in C too, when i use timer with C (SetTimer), when i
minimalize or maximalize other appliacation, my application (Mangement
C + RealTime Priority):

[snip]

The C standard doesn't define anything called SetTimer. It must be an
exension that's specific to whatever implementation you're using. Try
asking in a newsgroup that's specific to your system (possibly
comp.os.ms-windows.programmer or one of its subgroups).

--
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 14 '05 #8
Rafał wrote:
Martin Ambuhl wrote:
Rafał wrote:
Hi. Timer in C# not work,
Is anyone surprised that C# doesn't work.
Thread + Loop + Sleep + DateTime.Now too not work
(Process.Prioritet = RealTime)
What i do wrong?


1) Using C#
2) posting questions to comp.lang.c (where the C programming language
is discussed) about C#, a proprietary product of the evil empire,
purporting to be *some* programming language, but certainly not C.


ok, but i write in C too, when i use timer with C (SetTimer),


There is no such thing in C as 'SetTimer'.
I write in Lisp, Scheme, Fortran, Ada, Objective C, C++, Pascal, Perl,
Python, and several assembly languages. It may be a surprise to you,
but that doesn't make them topical in comp.lnag.c.
when i
minimalize or maximalize other appliacation, my application (Mangement C
+ RealTime Priority):


None of 'minimalize' or 'maximilize' or 'Mangement C + RealTime
Priority' have a damn thing to do with the C programming language.
Please get a clue. I suppose 'Mangement C' is a language for veteranians.
Nov 14 '05 #9
Martin Ambuhl wrote:
Rafał wrote:
Hi. Timer in C# not work,

Is anyone surprised that C# doesn't work.
Thread + Loop + Sleep + DateTime.Now too not work
(Process.Prioritet = RealTime)
What i do wrong?

1) Using C#
2) posting questions to comp.lang.c (where the C programming language is
discussed) about C#, a proprietary product of the evil empire,
purporting to be *some* programming language, but certainly not C.

heh, looks more like a lame attempt at visual basic + java ;)
Nov 14 '05 #10
> ok, but i write in C too, when i use timer with C (SetTimer)...

The actual function for the timer, as defined by the GNU C library,
uses clock() to return the current time in milliseconds. However, I've
found that function, along with the Windows API's GetTickCount() are
only accurate to 16 milliseconds. When I need a high accuracy timer
(on Windows only, but since you are using C#, you are probably using
Windows anyway), I usually use Windows API's GetPerformanceFrequency()
to determine the CPU speed, then use GetPerformanceCounter() (or maybe
rdtsc...) to get the CPU time stamp, and divide the latter by the
former. That seems to work very well, except you need to do 64 bit
arithmetic or convert the value to double using shift-add.

Nov 14 '05 #11

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

Similar topics

0
by: none | last post by:
Hello I have created a realtime data intensive application in C++/CLI. Data streams into this application through a set of ActiveX controls. For example, each stock symbol will be assigned to...
6
by: aikwee | last post by:
is it possible to make a thread priority to realtime mode in vb.net ?
4
by: Lars Netzel | last post by:
Hello! Is there anyway in VB.NET (windows forms) to work in realtime on the database? I mean entering stuff in a textbox directly, updates the database... Best Regards /Lars
4
by: malv | last post by:
How would you approach the following? In a multithreaded realtime data acquisition system (all python v2.4), after hours of running without a snag, without warning python hangs at once without...
2
by: RMB | last post by:
I am using the filesystemwatcher to track the movement of files from folder to folder. I am tracking how long it takes for each file to get from point A to point B. I have been able to do this,...
5
by: zl2k | last post by:
hi, all I am trying to moniter the runing of a program by printing out some characters in a line at each stage. say, //program part1 cout<<"part1 "; //program part2 cout<<part2 "; ....
1
by: Rancid Buttchutney | last post by:
I've tried searching the web but I've had little success finding a cross-browser(IE, Firefox and Opera anyway) implementation of a restricted text INPUT that works in realtime before a character...
4
by: =?Utf-8?B?YXVsZGg=?= | last post by:
hello, i'm not sure if this is possible. i have a small VS 2005 C# windows application. it has a textbox and a button. once the user presses the button it fires off many tasks. i want to use the...
1
by: cleary1981 | last post by:
Hi, I need pointed in the right direction here. I have a mysql database on windows, I have developed a realtime system also which adds a record to my database every few seconds. The problem I am...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.