Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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ÐéÄâ»úÉÏÍø

ÐéÄâ»úlinux°æ±¾£ºredhat9.0
×ܽáһϣºÒª±£Ö¤ÐéÄâ»úϵͳ¿ÉÒÔÉÏÍø£¬µÃÏȽâ¾öÐéÄâ»úºÍÕæʵÖ÷»úµÄÁ¬½Ó¹Øϵ¡£VMwareÖ÷Òª¸ø³ö3ÖÖģʽ£¬ÎÒÃdz£ÓõÄÓГbridge£¨ÇŽӣ©”ºÍ
“Nat£¨ÍøÂçµØַת»»£©”·½Ê½¡£ÐéÄâ»úÉèÖ÷½·¨£ºµ¥»÷“ÐéÄâ»ú”→“ÉèÖÔ→“ÒÔÌ«Íø£¬È»ºóÑ¡ÔñÁ ......

Linux ImageMagick ת»»Í¼Æ¬¸ñʽ¹¤¾ß¼°ÃüÁî


    Ç°ÃæÔÚÒ»¸öÏîÄ¿¿ª·¢ÖÐÓõ½ÁËImageMagick£¬ÎÒÃÇ×Ô¼ºµÄ²âÊÔ»·¾³¶¼Õý³££¬È»ºó¾Í°´ÕÕÎÒÃÇ¿ª·¢»·¾³µÄ°²×°·½·¨°²×°ÁË¿Í»§µÄ²âÊÔ»·¾³£¬µ«ÔÚ´¦ÀíjpegÀàÐÍͼƬµÄʱºò±¨´íÁË¡£»ØÍ·Ò»¿´ÅäÖÃlog£¬¾ÓÈ»²»Ö§³Öjpeg¡£
    ImageMagick ÊDZ任ͼƬµÄ¿âȺ£¬Ö§³Öperl£¬C++£¬JAVAµÈµÈÓïÑÔ¡£¿ÉÒ ......

Linux ÄÚºËÖÐµÄ GCC ÌØÐÔ(ת£©


Linux ÄÚºËÖÐµÄ GCC ÌØÐÔ(ת£©
Á˽âÓÃÓÚ C ÓïÑ﵀ GCC À©Õ¹
ÎĵµÑ¡Ïî
<tr
valign="top"><td width="8"><img alt="" height="1" width="8"
src="//www.ibm.com/i/c.gif"/></td><td width="16"><img alt=&qu ......

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


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

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ºÅ