Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

linuxÏÂͳ¼Æʱ¼äÀà

class CTimeTickCount
{
public:
CTimeTickCount(int threadIndex, int id )
{
struct timezone tz;
gettimeofday(&m_tvStartTime, &tz);
// m_tmStartTime = ACE_OS::gettimeofday();
m_iThreadIndex = threadIndex;
m_iID = id;
}

~CTimeTickCount()
{
struct timezone tz;
struct timeval tv;
gettimeofday(&tv, &tz);

// ACE_Time_Value currTime = ACE_OS::gettimeofday();
long cost = (tv.tv_sec - m_tvStartTime.tv_sec) * 1000 * 1000;
cost += (tv.tv_usec - m_tvStartTime.tv_usec );

if(cost >= 100 * 1000 )
{
//NVS_DEBUG((NVS_LM_ERROR, "====thread no: %d, cost time: %dms, id: %d.",
// m_iThreadIndex, cost, m_iID));
printf( "====thread no: %d, cost time: %dms, id: %d.\n", m_iThreadIndex, cost, m_iID));
}
}

private:
struct timeval m_tvStartTime; // ACE_Time_Value m_tmStartTime; // ¿ªÊ¼Ê±¼ä
int m_iThreadIndex; // Ï̺߳Å
int m_iID; // ±êʾ
};


Ïà¹ØÎĵµ£º

ʵսLinux Bluetooth±à³Ì£¨ËÄ£© L2CAP²ã±à³Ì

£¨L2CAPЭÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPЭÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼­Á¬½Ó¿ØÖƺÍÊÊÅäЭÒé (L2CAP) ΪÉϲãЭÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àЭÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãЭÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......

Linux repair filesystemÎÊÌâµÄ½â¾ö°ì·¨

    ¹«Ë¾ÓÐ̨ÔËÐÐCentOS5.3µÄµçÄÔ½ñÔçÆô¶¯µÄʱºòÒ»Ö±Ìáʾ#repair filesystem 1ϵͳÎļþË𻵣¬ÐèÒªÐÞ¸´£¬È»¶øʹÓÃfsckÐÞ¸´ÁË°ëÌ컹ÊÇÎÞ·¨½øÈëXWindow¡£ÕâʱÎÒÐèÒªÓÃÓÅÅÌ¿½±´ÀïÃ漸¸öÎļþ£¬Ë÷ÐÔµ½ÃüÁîÐÐshellÖп½±´µÃÁË¡£¿ÉÊǽøÈ¥mountÉ豸µÄʱºòÈ´ÌáʾÎÒ£ºÏµÍ³ÎļþĿ¼ֻ¶Á£¬ÎÞ·¨´´½¨¹Ò½ÓÉ豸Îļþ......Ôõô° ......

Áé»îʹÓÃLinuxϵÄglimpse¹¤¾ßºÍteeÃüÁî


²ÉÓÃglimpse¿ÉÒÔ¶ÔÔ´´úÂë½øÐÐË÷Òý£¬ÕâÑùÔÚ·±ÔӵĴúÂëÀïÃ棬¿ÉÒԺܿìµÄÕÒµ½¹Ø¼ü×Ö¡£
Õâ¸ö¹¤¾ß¾ÍÊÇglimpse¡£Ê¹Ó÷½·¨¾Í²»¶à˵ÁË¡£¿ÉÒÔ²égoogleÂ ^__^
²ÉÓÃteeÃüÁî¿ÉÒÔ½«glimpse²éÕÒ³öÀ´µÄÐÅϢת´æΪÎļþ¡£
¾ÍÊÇÕâÑù£º
    glimpse CONFIG_BOOTDELAY | tee bootdelay.txt
ÕâÑù¾Í²é³öÁËËùÓÐCONFI ......

linux ²éÕÒÖ´ÐгÌÐòµÄµ±Ç°Â·¾¶

linux shell pwd ÏÔʾµ±Ç°Â·¾¶
¼ÙÈôÓÐtest.cpp
g++ test.cpp -o test
./test
ÏëÔÚtestÖÐÕÒµ½µ±Ç°Ö´ÐгÌÐòËùÔڵķ¾¶
¿ÉÒÔÔÙtest.cppÖÐʹÓÃreadlinkº¯Êý
¾ßÌå¼ûÈçÏÂʵÀý£º
#include<iostream>
#include<unistd.h>
#include<dirent.h>
#include<string.h>
#include<string>
using ......

linuxϹ²ÏíÄÚ´æ(shm)ʹÓÃʾÀý

#include <sys/ipc.h>
#include <stdio.h>
#include <sys/shm.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#define PERM IPC_CREAT //S_IRUSR|S_IWUSR
#include <errno.h>
int main(int argc,char **argv)
{
int shmid[2048];
c ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ