Pentium Time Stamp Counter access in C++

Does the Forte C++ compiler support the 'rdtsc' pentium instruction?
How can the following gcc code snippit be ported to forte?
typedef unsigned long long tsc_t;
extern inline tsc_t rdtsc() {
asm("
rdtsc
movl %eax,-8(%ebp)
movl %edx,-4(%ebp) ");
Thanks,
-Blaine

Hi SV,
Besides Viorel_'s method, which converts the DateTime in .Net Framework to OLE automation date, you could also use insert SQL statement to insert the DateTime into the table. For example, in this code example:
https://code.msdn.microsoft.com/CSUseADO-93147f1b
the author insert DateTime by using parameterized insert SQL statement, and set the parameter type to "ADODB.DataTypeEnum.adDate" to insert a DateTime instance to it.
// Append the parameter for ModifiedDate (datetime)
ADODB.Parameter paramModifiedDate = cmdInsert.CreateParameter(
"ModifiedDate", // Parameter name
ADODB.DataTypeEnum.adDate, // Parameter type (datetime)
ADODB.ParameterDirectionEnum.adParamInput, // Parameter direction
-1, // Max size (ignored for datetime)
DateTime.Now); // Parameter value
cmdInsert.Parameters.Append(paramModifiedDate);
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Transfer time stamp from text file into MS Access thru Labview

    Hello everyone,
    I am Cruz; Long time listener, First time caller.
    I am currently monotoring data being collected by an oven. The data is stored in a text file. I am using Labview to take the data from the textfile and place it in an MS access DB for manipulation. The first three columns of the text file are the time stamp of data. When i transfer the data into Access i cant get the first three columns to display as a time stamp. Can have some pointers on what how to get the first three columns to display correctly.
    Additional info:
    the text file is a 1D array that gets overitten with every new mesurement tanken. the transfer to Acces is to not loos any of the information and to better manipulate the data into forms and such.
    Running Labview 2010
    attached is code and text file.
    Any help is greatly appreciated.
    Attachments:
    Oven test other.vi ‏16 KB
    datalog032010003.txt ‏1 KB

    Your first mistake is reading the file as DBL. Your first three columns are obviously not numeric values. Did you ever look at the output array? Read it as strings. Second, you would need to combine those first three columns to create an actual time stamp before you write to the db. Unless of course you have one column for date, one column for time, and one column for AM/PM. I would not recomend that type of structure in the db.

  • Using counter to time stamp to text file

    Dear all,
    I am using counter to acquire singnal from quadrature linear encoder. I would like to time stamp the data acquisition to text file but I found that I can't choose to read time. Anyone know how to solve this problem?
    Attachment is my program.
    Thank you very much!
    Best regards,
    George
    Attachments:
    encoder continous 21-4-2013.vi ‏28 KB

    Hi,
    Have you seen these two articles?
    http://digital.ni.com/public.nsf/allkb/68806B93A21​355E98625726F0064822B
    http://digital.ni.com/public.nsf/allkb/5D42CCB17A7​0A06686256DBA007C5EEA
    Basically, it can be done, but be aware it may not be as accurate as you would like.  Follow the code in the first article and note that the easiest way would be to just use the basic File I/O VIs to write to text file, since the Write to Measurement File VI will only work with waveforms and you have counter output.
    Matt Lee
    National Instruments
    Applications Engineer

  • Windows 8 Last Access Time Stamps not working

     Hi I have been trying to fix a issue with last access time stamps not working when I open a file
    so will have time on created modified and accessed from when created but some are wrong like one file
    saying
    created ‎Sunday, ‎September ‎14, ‎2014, ‏‎5:19:32 AM
    modified  ‎Sunday, ‎September ‎14, ‎2014, ‏‎5:19:32 AM
    accessed Sunday, ‎September ‎14, ‎2014, ‏‎5:19:32 AM
    I'm not sure what can cause this please help thank you

    Hi whowhatwere,
    Are you only confused about the last access time not change when you open a file?
    If you want to know more details about modified and created time, we can refer to the following KB.
    http://support.microsoft.com/kb/299648/en-us
    About the accessed time, please refer to the following blog.
    How do I access a file without updating its last-access time?
    http://blogs.msdn.com/b/oldnewthing/archive/2011/10/10/10222560.aspx
    The blog mentioned that: In fact, the intuitive definition of access is more specific: It's "the last time I opened, modified, printed, or otherwise performed some sort of purposeful action on the file."
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

  • GPS Access to high precision time and time stamping WASAPI microphone captures

    I am interested in using multiple WPs to capture microphone WAV that is time stamped with high accuracy (sub millisecond), hopefully from the GPS system. The GPS hardware obviously has the capability to sub microsecond levels but I can't find an API for
    it.

    What I would like to do is get geo positional data, which has a defined statistical uncertainty but might be relatively better correlated and as accurate a time stamp as possible.  Latency isn't an issue but consistency is. GPS, of course, easily produces
    time information to sub microsecond though I don't know a way to access it in WP.  .1ms consistency would be all I really need but it's important that each phone in a cluster be able to capture and time stamp a sound (assume all phones are equidistant
    from a source) to within .1ms. I am thinking of a product that could be used, for one obvious example at weddings, to capture the proceedings and allow after the fact enjoyment by replaying the proceedings and shifting the focus on the bride/groom minister
    as they talk using beam forming dsp tech from the data. There are other ways but it occurs to me that the ubiquity of smart phones would really make this easy. Just have the guests download an app. It would be part of a wedding doc package along with videography
    and stills.

  • Can access a files time stamp for calculations?

    I'm using Diadem 10.2.  We have an issue with our data, where the first cycle is corrupt iff the time stamp between the current file and previous file is less than 30 minutes.  This indicates a manual intervention, and it results in skewed results.
    I want to discard the first cycle when the File time stamps are less than 30 minutes apart...but I can't find a way do it.
    We use runtime in the file as a time channel, begins at zero each file, so i can't use any channel values to do this?
    Thanks in advance for the help.  Completing this task will end my assignment with this team, and I'll be moving to a new position at the end of the week.  Not sure if Diadem is in my future or not, but I highly doubt it.
    Thanks in advance...

    Hi Jeff,
    What type of data files are these?  If it's a custom file format, did you write the DataPlugin that reads the file into DIAdem?  Is the aquired date/time stored inside the data file somewhere?  For a TDM or TDMS file, this would typically be in the "File.DateTime" property, which shows up in the DataFinder as "File.Storage datetime" and in the Data Portal as "File.Storage date/time".
    The File created and modifed dates you get from Windows tend to change unexpectedly, so it would not be ideal to use those for a mission-critical process.
    I'm assuming that you're loading all the various data files into DIAdem, then concatenating them into contiguous channels that contain all the data from all the files.  You will then need to use e "Calculate Differences" ANALYSIS function to create a new channel that has the delta date/time values for each row. Once this is the case, you can use the Channel Calculator to find rows where the delta date/time value is invalid and set these rows equal to NoValues.
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • Find record count between two time stamps

    Hi All,
    Problem: My custom table having a datetime column ;
    I want to find records processed between two time stamps.
    say: records between 2010-04-28 10:15:00 and 2010-04-28 12:30:00
    Could you please help me in this.
    Thanks in advance
    Karri

    use To_date function in where column on that Dat_col
    WHERE date_col BETWEEN TO_DATE ('2010-04-28 10:15:00',
    'mm-dd-rrrr hh24:mi:ss')
    AND TO_DATE ('2010-04-28 12:30:00',
    'mm-dd-rrrr hh24:mi:ss')

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • How to plot contour using time stamp

    Hello,
    I need help on the following:
    I acquire size distribution data each minute from a particle counter. I would like to plot the data as a contour plot using time stamp on the x-axis, the size bins on the y-axis and the 2D data on the z-axis. I cannot get the contour functionality in LV 2011 to accept the time stamp format. I did change the format of the x-axis to "absolute time" but it still doesn't work, see simplified diagram below.
    Any advice on reformatting a time stamp to something the contour plot understands??!?
    Thanks a lot,
    Claus
    Attachments:
    countour.png ‏20 KB

    Milan R wrote:
    Hi Mogensen!
    You could use the "To Double Precision Float" vi to convert the timestamp to a double prescion number as mentioned in this forum post "time stamp to number function". As mentioned in that forum, the number is based on the LabVIEW epoch date so you can use it to compare values taken at a specific time.
    I can't look right now but will that work?
    I thought the 3D stuff was single and the magnitude of the time stamp would swamp the difference in time stamps.
    Just thinking out loud.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Can I create a time stamp of 2ms or 1ms resolution in a text file

    I have trouble creating time stamps in text files that have 2ms resolution. Although my timed loop in LV 7.1 is running the code at 500 Hz without any late iterations, and I record all the data points in the data file, the time stamps are the same in ms range for 5 consecutive points, i.e 10ms resolution. I would like the time stamps to have a 2ms resolution, where each data points every 2ms should show a different milisecond time stamp.
    I am trying to do this to be able to show exact 2ms-time stamps for each data sample from 1 digital input line sampled at 500 Hz using NI-DAQmx 7.2. So far I have been using "Get/Date Time in Seconds" and "Format Date/Time String" to display the time stamp in the milis
    econd range.

    Use the Tick Count (ms) function. Call Get Date/Time in Seconds when you start to get time of day. Also call the Tick Count (ms). After acquiring each point call Tick Count (ms) again and subtract from the starting tick count. Then add this to the starting Time in Seconds value (with appropriate scaling). The result is your timestamp.
    Another approach: If you are using hardware timing for the 500 Hz acquisition, each sample is automatically 2 ms after the previous one. Record the start time and add 2 ms for each sample.
    Lynn

  • IDOC number should be passed with Time stamp

    Here the scenario is IDOC to File.
    Currently I am getting the date and time stamp but I want to pass the IDOC number after the torr_asn_20080522-010137-257.txt
    torr_asn_?_20080522-010137-257.txt
    Here in place of question mark I want to pass the IDOC number and how to pass
    Let me know quickly as the issue is very urgent.
    Points will be awarded.

    Hi Arjya,
    If your requirement is to create , the file name dynamically for your receiver file adapter, you can do so using your FILE ADAPTER CONFIGURATION itself, and need not go for any JAVA Mappping / Java Code at all.
    *The dynamic filename generation concept is as follows.8
    In your filename field in the receiver file adapter, just give a variable with % symbols. (eg: %file% ).
    Now, under the option Variable Name Substitution, you can give how the value has to be created.
    It can be your interface name, sender service name, etc or it can be some value dynamically from your payload.
    For the former, your give
    message:interface_name ,etc
    and for the payload part you give,
    Payload: "your element root which u wanna acecss"
    Just check this link out,
    http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm
    And read the contents under variable substitution and it will help you understand the concepts better.
    Also, in your FILE Adapter under the option FILE CREATION MODE, you have options like,
    1.Add Counter,
    2. Append
    3. Create
    4. Add Time Stamp
    Reward points if this helps
    Regards
    Pragathi.

  • Write signal with time stamp

    hii...
    I've a student project to read and write data from a continous signal with labVIEW.. I'm going to read the system for 24/7, The reading program already finished.
    The problem is in the writing procces.. I have no idea how to write data to file with low level vi.. I'm new in LabVIEW and I already try some modification to my program but it still don't work as i want.
     I want the writing procces only occur when i press the button and it only run for a few second with constant time stamp.. It just to check if there are any data missing or not.. The system are a fast (It's what make problem bigger).
    I'm getting crazy at all.. If some one could help me i will be very grateful... I'm using LabVIEW 8.5 and PCI 6259...
    Kind Regards,
    Dani
    -Keep Learning-
    Attachments:
    Read Circle Encoder.gif ‏22 KB

    Hi Dani,
    here's the two-loop version...
    When you use the local you wouldn't need the queue at all... But using locals may lead to race conditions (not in your simple vi, but general) - locals don't provide "atomic" data access.
    In Labview the wire is equivalent to variables in text programming languages!
    The vi uses the producer-consumer-scheme (Erzeuger-Verbraucher-Struktur ?): one loop is producing values, the other is consuming them. It's a common scheme in LV programming, you will find examples and a lot of threads here in the forum.
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    circle.vi ‏48 KB

  • How to add a time stamp to an array

     Currently the VI that I have attached has the capacity to log data from the set of 14 arrays. I currently have a tick counter hooked up. However, I would like to add a time stamp that will display the elapsed time in seconds from the begining of the data logging. Could anyone help me out with that? Please see the attached VI and sorry for how messy it is, I have yet to go back and clean up the wiring. 
    the mess of arrays on the lower left hand of the while loop feed into the "Index Array" building block and from there they will be scaled (for most of the wires the multiplyer is just there so that I can see what channel they will be when I hook it up for logging) The wires then feed into a "Build Array" Building block and I assmed that is where I had to hook up the time stamp for me to be able to log it.
    Thanks,
    Attachments:
    PDAQ56 datalogging V11.vi ‏104 KB

    mets501 wrote:
      Also, try pressing Ctrl-U on the block diagram.  It cleans up the wires for you atomatically :-)
    Jeremy
    That tool does not exist before LabVIEW 8.6.  The original poster attached a VI from LV 8.0
    Attached is the VI where I ran Block Diagram cleanup in 8.6.1f1 and back saved to LV 8.0.  I went through and cleaned up almost all the coercion dots as well.
    The original poster should start working from this file since it is much cleaner than the one they posted.
    Attachments:
    PDAQ56DataloggingV11.vi ‏84 KB

  • Time stamp does not update automatically

    Hi, All. I want include the time stamp (yyyy-mo-dd-min-sec) in the file name. However, the value of the time stamp does not update automatically/synchronizes with the computer clock at each new run. I need to do it manually with the right click and update the time to the current.
    How can I solve this? Thanks a lot in advance.

    What does this have to do with NI counter/timer hardware?
    What language are you using and what function are you using to get a timestamp? If the language is LabVIEW, then all you need is Get Date/Time in Seconds. If you are using a front panel Time Stamp control, then you are using the incorrect function.

  • File Time Stamp

    hi,
    I have to compare the two file time stamp , one file is on my local machine and the other file is on my web server.
    I am using :-
    long t= urlC.getLastModified(); // to get the last modified time for a file on my web server.
    and for my local file:-
    long ut= f.lastModified(); // to get the time for my local file.
    I need to compare this two time to know that if i have new file or not. If i have a old file I copy and paste the new file on my machine. The problem is after copy and paste both time should be same since the modified time is same for both file, but i think when i use the f.lastModified() on my local file its giving me the last accessed time rather then modified time and this way even though the file are same after i paste the latest one the time stamp results are different.
    Any ideas on this ...........
    The goal is to compare a time stamp of one local file with a file on my web server. if my local file is old then user needs to get this new file and replace the old file on his system.
    Problem: After replacement, eventhough file is same its timestamp result are different. The modified time is same in the file property, but for some reason a call to f.lastModified()is getting the accessed time which is different since its takes the time when we paste the new file.

    On 09/11/2011 22:26, isutton wrote:
    > NW 6.5 with latest SP. Mac OS X (Leopard and Snow Leopard). AFP is the
    > standard connection and yes this has only happened since DST change. I
    > did reboot one of the servers and the issue was fixed. I would like to
    > know what causes this though so that I can avoid rebooting servers.
    We've seen this to and it seems AFPTCP.NLM doesn't notice the DST
    change. The only fix I'm aware of it to unload and then reload
    AFPTCP.NLM (or restart the server, which whilst brutal can sometimes be
    cleaner).
    HTH.
    Simon
    Novell Knowledge Partner (NKP)
    Do you work with Novell technologies at a university, college or school?
    If so, your campus could benefit from joining the Novell Technology
    Transfer Partner (TTP) program. See novell.com/ttp for more details.

Maybe you are looking for

  • Some questions about standard search help in WD4A

    Hello all, I use the SAP standard search help for a business partner number input field. It works fine, but I need to customize the result popup a bit. I have the following issues: 1. After the search I get a table with a list of all found business p

  • Epub; it's listed but not viable

    It's nice Adobe has listed epub as a digital editions export option. It is terribly unfortunate that a company proud of publishing, communications and elearning can't/doesn't provide informatin on how to make this format viable. I love InDesign, Acro

  • Providing HR Admin/TIme Admin view like MSS

    Hi, I am trying to develop Time Admin/HR Admin/Delegated MSS view just Like MSS .  So, these administrator  can see the employees and approve time and request leave request and perform clock-in/out entries. As you know MSS goes A012 relationship. I t

  • Issues with Office 2011 on my OSX 10.5.8 Air

    I recently purchased and installed Office 2011 on my first generation macbook air.  The operating system is OSX 10.5.8 and I re-installed that recently as well. The issue I'm having revolves mostly around outlook, and that is that it STALLS like nobo

  • My iphone 3gs downgrade 5.0 to 4.33 and unlock with redsnow but network no  help me any one pls

    my iphone 3gs downgrade 5.0 to 4.33 and unlock with redsnow but network no  help me any one pls